BrandonErik-FS / wdv339_spotify-search

0 stars 0 forks source link

Add A Spotify Access Token Validation Middleware #12

Closed BrandonErik-FS closed 1 year ago

BrandonErik-FS commented 1 year ago

Create a middleware that will validate Spotify Access Tokens to determine if they are still valid or not and whether or not the user needs to re-authorize the application to be able to access their Spotify Account.

BrandonErik-FS commented 1 year ago

I've created a middleware to validate the Spotify Access Tokens stored in the MongoDB database. If they are valid, the middleware will proceed with making requests to the Spotify API. If the token is expired, the middleware will refresh the token. If there is no token in the database, the middleware will restart the OAuth authorization process to obtain a new token from the Spotify API.