D
D
Dmitry2018-06-27 00:48:46
OAuth
Dmitry, 2018-06-27 00:48:46

How to login to Spotify using Vue + Express?

I'm trying to implement authorization for the Spotify service according to their guideline . Implemented something like this:
1. On the client side (Vue) through axios I make a request to the server (Express).
5b32b34a763d9715251474.png
2. On the server, I repeat everything in the same way as in the example
5b32b3952bc34791574535.png
. In theory, there should be a redirect to the auth spotify page, but in the end I get the following error:
5b32b40544162732781889.png
Here is info from the network
5b32b4301c8ec918529123.png
First, because of which I have a problem with cors, if I follow the example and there is no such problem in the example?
Secondly, how to fix it? I tried to prescribe headers through res.header () before the redirect, but it did not help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question