I will say the spotify auth works if there is an existing account in the users with an email that matches what spotify has. It's not working when there is no matching user, but in the docs it reads as though it would create a user with the email provided by spotify.
In google domains dashboard I have an A record setup to point to the server IP given by DigitalOcean
Interesting.. And you're correct it should create the new user. Can you share the whole error?
Can you run these commands and share the results?
docker logs appwrite
docker ps -a
This is all I have from the timeframe I was getting this error
Sorry, ignore that top log. I forgot to account for the time different. Here is the correct logs
Error] Timestamp: 2023-06-02T02:01:12+00:00 [Error] Method: GET [Error] URL: /v1/account/sessions/oauth2/:provider/redirect [Error] Type: TypeError [Error] Message: Cannot assign null to property Appwrite\Auth\OAuth2\Spotify::$user of type array [Error] File: /usr/src/code/src/Appwrite/Auth/OAuth2/Spotify.php [Error] Line: 171
Mmm this is really weird as the request to Spotify should return something, at least error JSON
Can you run curl https://api.spotify.com/v1/me in your server? and show the results?
So it's not blocked from your server
No, and like I had put above. I can login and authenticate via spotify if a user is preexisting in the db.
It's just won't create a new user via spotify auth
That's right, because this endpoint https://api.spotify.com/v1/me is called three times and two of which only if the user doesn't exist
Ah okay
can you share your OAuth2 code from the JS?
Lines 71 - 86
Can you try to add this user-read-email scope? and try again?
Yea, it might take some time, but I will.
I deleted my old account and tried again and it seemed to have worked.
👍
Thanks for all your help 🙂 It's very much appreciated.
[SOLVED] OAuth2 Spotify
Recommended threads
- Appwrite SSL Certificate Failure
Hello, I need help releasing a stuck domain. My Domain: adilnaib.engineer My Project ID: 68fe0aee001e999b5d71 Error: Failed to add domain to Fastly: {"msg":"B...
- [BUG] I'm facing an issue while creating...
Here’s what’s happening: When I try to create a new Web app on my Appwrite console (backend.keplr.in), the browser console shows multiple errors: Uncaught (in...
- Sites: Old deployment gets requests even...
Hi team, I use Sites to host a Next.js web app and it serves from old deployment for many hours. Is this expected? I thought it would serve from new deployment ...