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

Prashanth #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

Prashanth-Chandra
Copy link

@Prashanth-Chandra Prashanth-Chandra commented Mar 21, 2022

Made the basic app which takes fetches the data from the api when the bearer token is active. But the only problem is that I am not able to update the values when the API bearer token is active so I manually copied the data from when the api was active and pasted it as a variable which will be returned from the try and catch block if the try part (fetching from api) fails i.e. when the bearer token expires.

TODO : Make changes so that the data gets automatically updated when the API OAuth token is active.

EDIT : I was unable to integrate the data updation so instead of trying to store data I have decided to fetch the data every time the user clicks on "solution" , but it had its own problem i.e. the Spotify bearer token expires every hour so I had to create a new token every time a user opens the "solution" . I chose to use authorization code flow where I created a "refresh_token" which I used to request a new bearer token from Spotify. It took a while to get the refresh token as everything needs to be copied correctly and even if I miss a single character or space it wont work. Then I used the refresh token every time the page is opened which removed the need to store data. But the only problem with it is that it needs an active internet connection to work. I even added a button which will redirect the user to the playlist in an external browser.

SCREEN RECORDINGS:(Also available in the git repository)

Recording.mp4
Recording.New.Feature.mp4

…er than usual but it removes the need to store data as everytime we open task-16, a new Bearer token will be generated and the data will be fetched from the API
@Prashanth-Chandra Prashanth-Chandra changed the title First Commit Prashanth Mar 22, 2022
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

Successfully merging this pull request may close these issues.

1 participant