Creates a new Auth instance.
Custom fetch function. If not provided, the global fetch function will be used.
Optional
init: RequestInitOptional
options: AuthOptionsOptions for the auth class.
Make a request to the Spotify API using the client credentials grant flow and set the access token if one is returned by Spotify. Uses the set clientID and clientSecret if none are given.
Optional
clientID: stringThe client ID of your application.
Optional
clientSecret: stringThe client secret of your application.
Detect the set auth method.
Refreshes the access token using the given method or if no method is given, the detected method.
Optional
method: SpotifyAuthMethodsGenerated using TypeDoc
A class for the Spotify Web API authorization flow and authorization management.