Skip to content

Commit

Permalink
chore: update outdated comments (#370)
Browse files Browse the repository at this point in the history
  • Loading branch information
spider-hand authored May 28, 2024
1 parent 1abb6ce commit 2117c61
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions auth-next/email-link-auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ function emailLinkComplete() {
.then((result) => {
// Clear email from storage.
window.localStorage.removeItem('emailForSignIn');
// You can access the new user via result.user
// Additional user info profile not available via:
// result.additionalUserInfo.profile == null
// You can access the new user by importing getAdditionalUserInfo
// and calling it with result:
// getAdditionalUserInfo(result)
// You can access the user's profile via:
// getAdditionalUserInfo(result)?.profile
// You can check if the user is new or existing:
// result.additionalUserInfo.isNewUser
// getAdditionalUserInfo(result)?.isNewUser
})
.catch((error) => {
// Some error occurred, you can inspect the code: error.code
Expand Down
10 changes: 6 additions & 4 deletions snippets/auth-next/email-link-auth/email_link_complete.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,13 @@ if (isSignInWithEmailLink(auth, window.location.href)) {
.then((result) => {
// Clear email from storage.
window.localStorage.removeItem('emailForSignIn');
// You can access the new user via result.user
// Additional user info profile not available via:
// result.additionalUserInfo.profile == null
// You can access the new user by importing getAdditionalUserInfo
// and calling it with result:
// getAdditionalUserInfo(result)
// You can access the user's profile via:
// getAdditionalUserInfo(result)?.profile
// You can check if the user is new or existing:
// result.additionalUserInfo.isNewUser
// getAdditionalUserInfo(result)?.isNewUser
})
.catch((error) => {
// Some error occurred, you can inspect the code: error.code
Expand Down

0 comments on commit 2117c61

Please sign in to comment.