Announcements

Help Wizard

Step 1

NEXT STEP

Token Retrieval for client side rendered apps

Token Retrieval for client side rendered apps

 

Plan

Free

 

Operating System

Linux

 

Tech Stack

NodeJS, Angular 10

 

My Question or Issue

 

I am having an issue with the flow of the authentication process; i'll start off by saying I do not have issues with getting the access token but rather, how I can utilize this access token and get it where I want it for the future http requests.

 

My app is client side rendered Angular 10, when I request my access_token I am able to get it, but my callback URL cannot share data via. localstorage with another domain origin otherwise I would have just set the item and accessed it in my working tab. Likewise when Spotify performs the callback I cannot insert it into my database for the user to use like this because there is no additional info sent with this token so i.e I am using user_ids in my normal routes to insert items into the tables and such, but the callback only gives me the access token and other data that does not help me in this case.

 

If this application was a server-side rendered application this would be more simple as I could return the template in a separate tab and set the local storage item.

 

So my question is, how are you guys dealing with this? are you able to send additional information from the Spotify auth request along with the access token? I essentially just need to either get that token in my DB or local storage ( preferably local storage ) 

 

 

 

 

Reply
0 Replies

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random