OIDC: register (#11727)
* update uses of ValidatedDelegatedAuthConfig to broader OidcClientConfig type * add OIDC register flow to registration page * pass prompt param to auth url creation * update type * lint * test registration oidc button * fix: reference state inside setState * comment
This commit is contained in:
@@ -35,11 +35,14 @@ export const startOidcLogin = async (
|
||||
clientId: string,
|
||||
homeserverUrl: string,
|
||||
identityServerUrl?: string,
|
||||
isRegistration?: boolean,
|
||||
): Promise<void> => {
|
||||
const redirectUri = window.location.origin;
|
||||
|
||||
const nonce = randomString(10);
|
||||
|
||||
const prompt = isRegistration ? "create" : undefined;
|
||||
|
||||
const authorizationUrl = await generateOidcAuthorizationUrl({
|
||||
metadata: delegatedAuthConfig.metadata,
|
||||
redirectUri,
|
||||
@@ -47,6 +50,7 @@ export const startOidcLogin = async (
|
||||
homeserverUrl,
|
||||
identityServerUrl,
|
||||
nonce,
|
||||
prompt,
|
||||
});
|
||||
|
||||
window.location.href = authorizationUrl;
|
||||
|
||||
Reference in New Issue
Block a user