Skip to content

Authorisation Routes

Nisarag edited this page May 24, 2020 · 2 revisions

Authorisation Routes

These routes are used for authenticating the user via OAuth flow with the Spotify login.

Endpoint: auth/spotify

Method: GET

Description: This endpoint is used in the frontend so that when a button is pressed it goes to this endpoint which then prompts Passport.JS to begin the authentication process. After, this endpoint calls the endpoint below (auth/spotify/callback).

Endpoint: auth/spotify/callback

Method: GET

Description: When this callback is called, it prompts the user with a login screen to login with Spotify. After the user enters their credentials, they are then checked and if the users credentials are ok then this route redirects the frontend to its home page.