Skip to content

Commit

Permalink
Redirect to signup form if necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
srosset81 committed Jun 19, 2024
1 parent 19733d1 commit 3c86a7d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/frontend/packages/auth-provider/dist/index.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/frontend/packages/auth-provider/dist/index.cjs.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/frontend/packages/auth-provider/dist/index.es.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/frontend/packages/auth-provider/dist/index.es.js.map

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion src/frontend/packages/auth-provider/src/authProvider.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const authProvider = ({
return {
login: async params => {
if (authType === AUTH_TYPE_SOLID_OIDC) {
const { webId, issuer } = params;
const { webId, issuer, isSignup = false } = params;

if (webId && !issuer) {
// TODO find issuer from webId
Expand All @@ -47,6 +47,7 @@ const authProvider = ({
authorizationUrl.searchParams.set('code_challenge_method', codeChallengeMethod);
authorizationUrl.searchParams.set('redirect_uri', `${window.location.origin}/auth-callback`);
authorizationUrl.searchParams.set('scope', 'openid webid offline_access');
authorizationUrl.searchParams.set('is_signup', isSignup);

window.location = authorizationUrl;
} else if (authType === AUTH_TYPE_LOCAL) {
Expand Down

0 comments on commit 3c86a7d

Please sign in to comment.