Skip to content
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

Alert Google login error details #78

Merged
merged 1 commit into from
Jan 23, 2022
Merged

Conversation

sherryhli
Copy link
Member

@sherryhli sherryhli commented Dec 15, 2021

Ticket link

N/A, just a quick fix to display Google login error details properly.

Implementation description

  • Correctly typed the Google login error response for future reference
  • Stringified error object in alert message, otherwise it will display as [Object object]

Steps to test

  1. Click on the preview deploy link below
  2. Error message should be as follows:
{
    "error": "idpiframe_initialization_failed",
    "details":"Not a valid origin for the client: https://sistering-dev--pr78-sherry-google-login-ulm92vdz.web.app has not been registered for client ID 1076597678761-u9ek25jknj77d37atud522vb4ri1385t.apps.googleusercontent.com. Please go to https://console.developers.google.com/ and register this origin for your project's client ID."
}

Note that this error is expected because the preview URL is not listed as an authorized origin for our OAuth client. It does not come up in the staging environment.

What should reviewers focus on?

  • Nothing in particular, does it work?

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

@github-actions
Copy link

github-actions bot commented Dec 15, 2021

Visit the preview URL for this PR (updated for commit 4361c51):

https://sistering-dev--pr78-sherry-google-login-ulm92vdz.web.app

(expires Sat, 29 Jan 2022 04:20:10 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

@sherryhli sherryhli force-pushed the sherry/google-login-bug branch from 645bf71 to 4c7905e Compare January 20, 2022 22:44
@sherryhli sherryhli marked this pull request as ready for review January 20, 2022 22:59
@sherryhli sherryhli requested a review from LenaNguyen January 20, 2022 23:00
@sherryhli sherryhli force-pushed the sherry/google-login-bug branch from 4c7905e to 4361c51 Compare January 22, 2022 04:15
Copy link
Member

@LenaNguyen LenaNguyen left a comment

Choose a reason for hiding this comment

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

@sherryhli sherryhli merged commit b26689f into main Jan 23, 2022
@sherryhli sherryhli deleted the sherry/google-login-bug branch January 23, 2022 20:36
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