Please include the following information in your post:
- Which SDK this is regarding:Auth0 Angular SDK
- SDK Version: Latest
- Platform Version: Ionic Angular (Capacitor)
- Code Snippets/Error Messages/Supporting Details/Screenshots:
We want to pass an extra parameter to AuhService registration,
we succeeded to do it on the service registration module
but like this it’s static, we want to do it dynamically from the login page here
this.auth
.buildAuthorizeUrl()
.pipe(mergeMap((url) => Browser.open({ url, windowName: ‘_self’ })))
.subscribe();
Thanks for your help
Is this a feature request or bug report? If so, please create an issue directly in the corresponding GitHub repo. The Community SDK category is for general discussion and support.
As you are using auth0-js sdk, it is possible to pass extra parameter in the hosted login page when calling authoirze() method.
Then, you can capture the extra parameter in the hosted login page and pass the parameter as lock configuration.
(Note that auth0 hosted login page uses lock as default login template). To achieve your goal, enable the customization in the hosted login page. My Insite
Login:
When the user clicks on the Login button in your application, pass a parameter to disable signup.
var auth0 = new auth0.WebAuth({
clientID: environment.auth0.client_id,
domain: environment.auth0.domain,
responseType: environment.auth0.responseType,
audience: environment.auth0.audience,
redirectUri: environment.auth0.callbackurl,
scope: environment.auth0.scope,
});
const params = {
allow_signup:false,
};
this.auth0.authorize(params);
Then, in the hosted page, capture the extra parameter and pass to lock configuration option.
//Access the addtional parameters in the hosted login page like below
console.log(config.extraParams.allow_signup);
allowSignUp: config.extraParams.allow_signup
1 Like
Teamwork makes the dreamwork!