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

Fix missing ID causing cannot read error #109

Merged
merged 1 commit into from
Feb 3, 2020

Conversation

joshcanhelp
Copy link
Contributor

@joshcanhelp joshcanhelp commented Dec 31, 2019

Description

The id of the Passport profile should be a string but if the openid scope is not used during login, a profile may still be returned. This PR fixes the error during callback caused by a missing sub and user_id on the returned profile. Additionally, it checks for the split character to make sure that provider is not set to the id.

Developers should use the openid scope but this strategy should enforce that at startup, not fail during callback.

References

Closes #105

Testing

  • This change adds test coverage for new/changed/fixed functionality

The id of the profile should be a string but if the openid
scope is not used during login, a profile can be returned
but not parsed by this strategy. Developers should use
the openid scope but this strategy should enforce that
at startup, not fail during callback.
@joshcanhelp joshcanhelp requested a review from a team December 31, 2019 22:57
@joshcanhelp joshcanhelp added this to the v1.3.2 milestone Dec 31, 2019
@@ -1,11 +1,11 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing to dummy data

@@ -1,20 +1,19 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing to dummy data

@@ -1,20 +1,19 @@
{
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changing to dummy data

lib/Profile.js Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CH: Fixed small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot read property 'split' of undefined in Profile.js with GSuite login
2 participants