Skip to content

Instantly share code, notes, and snippets.

@robertmclaws
Created April 5, 2015 20:04
Show Gist options
  • Save robertmclaws/b7d20996ed7d02820065 to your computer and use it in GitHub Desktop.
Save robertmclaws/b7d20996ed7d02820065 to your computer and use it in GitHub Desktop.
How to use Auth0 Lock with .NET
function signin(returnUrl?: string, targetId?: string, showChrome: boolean = true) {
//RWM: We declare a new version every time because the old one gets disposed.
var lock = new Auth0Lock(auth0ClientId, auth0Domain);
lock.showSignin({
callbackURL: window.location.origin + "/signin-auth0",
authParams: {
state: returnUrl !== "" ? "ru=" + returnUrl : null,
scope: "openid profile"
},
container: targetId,
popup: showChrome,
connections: ["windowslive", "google-oauth2", "linkedin", "facebook", "aol", "yahoo", "amazon"],
rememberLastLogin: true,
sso: true
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment