Skip to content

Commit

Permalink
Altered readme samples to remove ref to localstorage (#1759)
Browse files Browse the repository at this point in the history
Fixes #1723
  • Loading branch information
Steve Hobbs authored Dec 2, 2019
1 parent 642c222 commit 238047e
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,18 @@ Initializes a new instance of `Auth0Lock` configured with your application `clie
var clientId = "YOUR_AUTH0_APP_CLIENTID";
var domain = "YOUR_DOMAIN_AT.auth0.com";
var lock = new Auth0Lock(clientId, domain);
var accessToken = null;
var profile = null;

lock.on("authenticated", function(authResult) {
lock.getUserInfo(authResult.accessToken, function(error, profile) {
lock.getUserInfo(authResult.accessToken, function(error, profileResult) {
if (error) {
// Handle error
return;
}

localStorage.setItem("accessToken", authResult.accessToken);
localStorage.setItem("profile", JSON.stringify(profile));
accessToken = authResult.accessToken;
profile = profileResult;

// Update DOM
});
Expand All @@ -105,16 +107,18 @@ For more information, read our [passwordless docs](https://auth0.com/docs/connec
var clientId = "YOUR_AUTH0_APP_CLIENTID";
var domain = "YOUR_DOMAIN_AT.auth0.com";
var lock = new Auth0LockPasswordless(clientId, domain);
var accessToken = null;
var profile = null;

lock.on("authenticated", function(authResult) {
lock.getUserInfo(authResult.accessToken, function(error, profile) {
lock.getUserInfo(authResult.accessToken, function(error, profileResult) {
if (error) {
// Handle error
return;
}

localStorage.setItem("accessToken", authResult.accessToken);
localStorage.setItem("profile", JSON.stringify(profile));
accessToken = authResult.accessToken;
profile = profileResult;

// Update DOM
});
Expand Down

0 comments on commit 238047e

Please sign in to comment.