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

Getting a oauth_parse_profile_error for the Spotify provider when the user has no profile images #740

Closed
davidnoorda opened this issue Oct 3, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@davidnoorda
Copy link

Describe the bug
Getting a oauth_parse_profile_error for the Spotify provider when the authenticating user has no profile images.

Steps to reproduce

  1. Setup the Spotify provider
  2. Log in as a user with no profile images in Spotify

Expected behavior
The user is able to login successfully.

Screenshots or error logs
[next-auth][error][oauth_parse_profile_error] [ TypeError: Cannot read property 'url' of undefined at Object.profile (C:\...\node_modules\next-auth\dist\providers\spotify.js:32:35) at C:\...\node_modules\next-auth\dist\server\lib\oauth\callback.js:172:32 at Generator.next (<anonymous>) at asyncGeneratorStep (C:\...\node_modules\next-auth\dist\server\lib\oauth\callback.js:26:103) at _next (C:\...\node_modules\next-auth\dist\server\lib\oauth\callback.js:28:194) at C:\...\node_modules\next-auth\dist\server\lib\oauth\callback.js:28:364 at new Promise (<anonymous>) at C:\...\node_modules\next-auth\dist\server\lib\oauth\callback.js:28:97 at _getProfile2 (C:\...\node_modules\next-auth\dist\server\lib\oauth\callback.js:200:23) at _getProfile (C:\...\node_modules\next-auth\dist\server\lib\oauth\callback.js:150:23), { display_name: 'david', email: 'david@test.com', external_urls: { spotify: 'https://open.spotify.com/user/{id}' }, followers: { href: null, total: 0 }, href: 'https://api.spotify.com/v1/users/{id}', id: '{id}', images: [], type: 'user', uri: 'spotify:user:{id}' } ] https://next-auth.js.org/errors#oauth_parse_profile_error

Additional context
I think this is a pretty simple fix in the providers/spotify.js file but let me know if you need any further information.

Thanks!

@davidnoorda davidnoorda added the bug Something isn't working label Oct 3, 2020
@davidnoorda
Copy link
Author

Sorry just found that this has been fixed already.

#612

I'll wait for the next release. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant