Closed BrandonErik-FS closed 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.
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.