Skip to content

Commit

Permalink
Merge pull request #112 from bitovi/TR-42-Make-login-work-again
Browse files Browse the repository at this point in the history
update oauth build
  • Loading branch information
justinbmeyer authored Sep 19, 2024
2 parents 71ccdc1 + b54bfcd commit b34da18
Show file tree
Hide file tree
Showing 21 changed files with 147 additions and 662 deletions.
7 changes: 3 additions & 4 deletions pages/oauth-callback.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ module.exports = function () {
<p>You will be redirected in one moment.</p>
<div id="mainElement">Loading ... </div>
<script type="module">
import JiraOIDCHelpers from "./dist/jira-oidc-helpers.js";
import oauthCallback from "./oauth-callback.js";
const jiraHelpers = JiraOIDCHelpers(${JSON.stringify(getSafeEnv())});
oauthCallback(jiraHelpers);
import oauthCallback from "./dist/oauth-callback.js";
oauthCallback(${JSON.stringify(getSafeEnv())});
</script>
</body>
</html>`
Expand Down
2 changes: 1 addition & 1 deletion public/dist/connect-main.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/dist/hosted-main.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/dist/hosted-main.min.js.map

Large diffs are not rendered by default.

219 changes: 119 additions & 100 deletions public/dist/src/jira-oidc-helpers.js → public/dist/oauth-callback.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions public/dist/oauth-callback.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions public/dist/production.css

Large diffs are not rendered by default.

513 changes: 0 additions & 513 deletions public/dist/src/JiraHelpers.js

This file was deleted.

1 change: 0 additions & 1 deletion public/dist/src/jira-oidc-helpers.js.map

This file was deleted.

8 changes: 0 additions & 8 deletions public/dist/src/shared/chunk-array.js

This file was deleted.

1 change: 0 additions & 1 deletion public/dist/src/shared/chunk-array.js.map

This file was deleted.

8 changes: 0 additions & 8 deletions public/dist/src/shared/map-ids-to-names.js

This file was deleted.

1 change: 0 additions & 1 deletion public/dist/src/shared/map-ids-to-names.js.map

This file was deleted.

12 changes: 0 additions & 12 deletions public/dist/src/shared/response-to-json.js

This file was deleted.

1 change: 0 additions & 1 deletion public/dist/src/shared/response-to-json.js.map

This file was deleted.

2 changes: 0 additions & 2 deletions public/dist/src/shared/types.js

This file was deleted.

1 change: 0 additions & 1 deletion public/dist/src/shared/types.js.map

This file was deleted.

7 changes: 5 additions & 2 deletions public/oauth-callback.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export default function oauthCallback(jiraHelpers) {
import jiraOIDCHelpers from "./jira-oidc-helpers.ts";

export default function oauthCallback(environment) {
const jiraHelpers = jiraOIDCHelpers(environment);

const queryParams = new URLSearchParams(window.location.search)
const queryCode = queryParams.get('code')
Expand All @@ -10,4 +13,4 @@ export default function oauthCallback(jiraHelpers) {
jiraHelpers.fetchAccessTokenWithAuthCode(queryCode);
}

}
}
2 changes: 1 addition & 1 deletion public/shared/main-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import "../shared/select-cloud.js";
import "../shared/velocities-from-issue.js"

import JiraLogin from "../shared/jira-login.js";
import JiraOIDCHelpers from "../jira-oidc-helpers.js";
import JiraOIDCHelpers from "../jira-oidc-helpers.ts";
import { getHostedRequestHelper } from "../request-helpers/hosted-request-helper.js";
import { getConnectRequestHelper } from "../request-helpers/connect-request-helper.js";

Expand Down
12 changes: 12 additions & 0 deletions rollup.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ import commonjs from '@rollup/plugin-commonjs';
import typescript from 'rollup-plugin-typescript2';

export default [
{
input: './public/oauth-callback.js',
output: {
file: "./public/dist/oauth-callback.js",
format: 'esm'
},
plugins: [
nodeResolve(),
commonjs(),
typescript()
]
},
{
input: './public/hosted-main.js',
output: {
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"sourceMap": true
},
"include": [
"public/**/*.ts",
"public/jira-oidc-helpers.ts"
"public/**/*.ts"
],
"exclude": [
"node_modules",
Expand Down

0 comments on commit b34da18

Please sign in to comment.