Skip to content

Commit 6ef4767

Browse files
docs(auth): log the token value in the idToken example (#3728)
The idToken example's subscription logged `string`, a type name rather than a value in that scope, so the snippet would not compile if copied. Log the `token` parameter the callback receives, matching the neighboring authState example. Also correct the comment on the line above, copied from the authState example, which referred to a user rather than the token this example streams. Reland of #3652 by saadlalam, whose fix was correct but could not be merged because the CLA check never cleared on that branch.
1 parent 3b1096f commit 6ef4767

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

docs/auth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ export class UserComponent implements OnDestroy {
171171

172172
constructor() {
173173
this.idTokenSubscription = this.idToken$.subscribe((token: string | null) => {
174-
//handle idToken changes here. Note, that user will be null if there is no currently logged in user.
175-
console.log(string);
174+
//handle idToken changes here. Note, that token will be null if there is no currently logged in user.
175+
console.log(token);
176176
})
177177
}
178178

0 commit comments

Comments
 (0)