Skip to content

(DOCSP-27598): Clean up web auth examples #2640

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 3, 2023

Conversation

mongodben
Copy link
Collaborator

Pull Request Info

Clean up auth examples

Jira

Staged Changes

Reminder Checklist

If your PR modifies the docs, you might need to also update some corresponding
pages. Check if completed or N/A.

  • Create Jira ticket for corresponding docs-app-services update(s), if any
  • Checked/updated Admin API
  • Checked/updated CLI reference

Review Guidelines

REVIEWING.md

@mongodben mongodben marked this pull request as draft March 1, 2023 22:40
@mongodben mongodben marked this pull request as ready for review March 2, 2023 15:54
@mongodben mongodben changed the title (DOCSP-27598): Clean up auth examples (DOCSP-27598): Clean up web auth examples Mar 2, 2023
Copy link
Collaborator

@nlarew nlarew left a comment

Choose a reason for hiding this comment

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

Code changes look good, a couple suggestions


// The logIn() promise will not resolve until you call `handleAuthRedirect()`
// from the new window after the user has successfully authenticated.
console.log(`Logged in with id: ${user.id}`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we split this into two code snippets? It's not totally clear to the skimmer that handleAuthRedirect() happens in another window / URL. Similar comment for the other OAuth providers.

Also, we have the same codeblock for Facebook but an entirely different format for Google. Should we unify these?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i thought about doing that in the first pass but didn't b/c of fact it was pretty outside scope of original ticket + some laziness. but we already got outside the scope of the ticket so might as well go for it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

and in the spirit of scope creep, i think i'll just throw in https://jira.mongodb.org/browse/DOCSP-28363 w this ticket as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

90% sure https://jira.mongodb.org/browse/DOCSP-28363 doesn't require any work. waiting for final confirmation from the eng who opened that ticket. but merging this now.

@mongodben mongodben merged commit cee2865 into mongodb:master Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants