Skip to content

docs(auth): log the token value in the idToken example - #3728

Merged
armando-navarro merged 2 commits into
angular:mainfrom
armando-navarro:docs-auth-idtoken-log
Aug 5, 2026
Merged

docs(auth): log the token value in the idToken example#3728
armando-navarro merged 2 commits into
angular:mainfrom
armando-navarro:docs-auth-idtoken-log

Conversation

@armando-navarro

Copy link
Copy Markdown
Collaborator

The idToken example's subscription logs string, which is a type name rather than a value in that scope, so the snippet would not compile if copied. This logs the token parameter the callback actually receives, matching the neighboring authState example.

This is a reland of #3652 by @saadlalam, whose original fix was correct but could not be merged because the CLA check never cleared on that branch. The fix is theirs; relanding it here so it isn't lost. While here, it also corrects the comment on the line above, which was copied from the authState example and referred to a user rather than the token this example streams.

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 angular#3652 by saadlalam, whose fix was correct but could not be
merged because the CLA check never cleared on that branch.
@armando-navarro armando-navarro added comp: docs Documentation. type: chore Maintenance with no user-facing behavior change. labels Aug 3, 2026

@tyler-reitz tyler-reitz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct — string is a type name in that scope, so the snippet couldn't compile as written. Logging the token parameter matches the neighboring authState example, and fixing the copied comment along with it is the right call.

Thanks for relanding @saadlalam's fix rather than letting it get lost to the stalled CLA check.

@armando-navarro
armando-navarro merged commit 6ef4767 into angular:main Aug 5, 2026
24 checks passed
@armando-navarro

Copy link
Copy Markdown
Collaborator Author

Thanks Tyler. Relanding it seemed better than losing a correct fix to a CLA check the author had no way to move.

@armando-navarro armando-navarro mentioned this pull request Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: docs Documentation. type: chore Maintenance with no user-facing behavior change.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants