Skip to content

Commit 2117c61

Browse files
authored
chore: update outdated comments (#370)
1 parent 1abb6ce commit 2117c61

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

Diff for: auth-next/email-link-auth.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,13 @@ function emailLinkComplete() {
6868
.then((result) => {
6969
// Clear email from storage.
7070
window.localStorage.removeItem('emailForSignIn');
71-
// You can access the new user via result.user
72-
// Additional user info profile not available via:
73-
// result.additionalUserInfo.profile == null
71+
// You can access the new user by importing getAdditionalUserInfo
72+
// and calling it with result:
73+
// getAdditionalUserInfo(result)
74+
// You can access the user's profile via:
75+
// getAdditionalUserInfo(result)?.profile
7476
// You can check if the user is new or existing:
75-
// result.additionalUserInfo.isNewUser
77+
// getAdditionalUserInfo(result)?.isNewUser
7678
})
7779
.catch((error) => {
7880
// Some error occurred, you can inspect the code: error.code

Diff for: snippets/auth-next/email-link-auth/email_link_complete.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ if (isSignInWithEmailLink(auth, window.location.href)) {
2626
.then((result) => {
2727
// Clear email from storage.
2828
window.localStorage.removeItem('emailForSignIn');
29-
// You can access the new user via result.user
30-
// Additional user info profile not available via:
31-
// result.additionalUserInfo.profile == null
29+
// You can access the new user by importing getAdditionalUserInfo
30+
// and calling it with result:
31+
// getAdditionalUserInfo(result)
32+
// You can access the user's profile via:
33+
// getAdditionalUserInfo(result)?.profile
3234
// You can check if the user is new or existing:
33-
// result.additionalUserInfo.isNewUser
35+
// getAdditionalUserInfo(result)?.isNewUser
3436
})
3537
.catch((error) => {
3638
// Some error occurred, you can inspect the code: error.code

0 commit comments

Comments
 (0)