Skip to content

Instantly share code, notes, and snippets.

@Tanver-Hasan
Last active January 27, 2021 15:42
Show Gist options
  • Save Tanver-Hasan/0d64b2b2a0ea81236954937ad7543dad to your computer and use it in GitHub Desktop.
Save Tanver-Hasan/0d64b2b2a0ea81236954937ad7543dad to your computer and use it in GitHub Desktop.
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_login: true,
app_version: "v1"
prompt: "login"
};
this.auth0.authorize(params);
@Tanver-Hasan
Copy link
Author

Tanver-Hasan commented Jul 9, 2019

Auth0.Swift

Auth0.webAuth(clientId: "[client id]", domain: "[domain]")
           .scope("openid profile offline_access")
           .audience("https://[tenant].auth0.com/userinfo")
           .parameters(["prompt":"login"])
           .start{}

@Tanver-Hasan
Copy link
Author

Tanver-Hasan commented Jul 9, 2019

Access the additional parameters in the hosted login page like below

console.log(config.extraParams.app_version);

@Tanver-Hasan
Copy link
Author

Access the additional parameters in the rule like below

console.log(context.request.query.app_version);

@Tanver-Hasan
Copy link
Author

.NET SDK.


  var client= new Auth0Client(clientOptions);
  var extraParameters= new Dictionary<string,string>();
  extraParameters.Add("connection","CONNECTION_NAME")
  var loginResult= await client.LoginAsync(extraParameters, new CancellationToken());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment