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

Get user info #107

Open
Andreas75 opened this issue Jan 18, 2021 · 0 comments
Open

Get user info #107

Andreas75 opened this issue Jan 18, 2021 · 0 comments

Comments

@Andreas75
Copy link

Hi,

I'm new to this and trying to use Oauth with Spotify. How do i get the logged in user info?

I have tried this:
OAuth.callback('spotify')
.done(function(result) {
console.log('yeees ', result);
})
.fail(function (err) {
console.log('noooo ' + err);
});
This returns a access token

Then i try this:
OAuth.callback('spotify')
.done(function(result) {
result.get('/me')
.done(function(response){
console.log('response ', response);
})
})
This returns:
Access to XMLHttpRequest at 'https://oauth.io/request/spotify/%2Fme' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
GET https://oauth.io/request/spotify/%2Fme net::ERR_FAILED

What am i doing wrong?

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

No branches or pull requests

1 participant