Oleg
Oleg

Reputation: 1559

Same callback URL for every Oauth app registration?

I want to register my app to multiple providers like LinkedIn, Facebook, Github ... and so on, I set my callback url to be a method triggered on my backend server like /authorizationCodeReceived which gets the URL with the code parameter and then sends this authorization code to the oauth2 provider and only then, after getting the request token I redirect my user to my index.html

Doing this for the first time , a question arises :

Should I set the same callback URL every time I register my app ? like /authenticated

Or should I set a different callback URL ? like

/authenticatedLinkedIn /authenticatedFacebook /authenticatedGithub

I'm not sure what is reasonable.

Upvotes: 0

Views: 180

Answers (1)

norekhov
norekhov

Reputation: 4318

I think it makes sense to use different urls. These services are different and probably you can change behavior independently.

For example prohibit Facebook. Or make extra parameters for LinkedIn. Or change url for GitHub without affecting others.

Other than that it's up to you.

Upvotes: 1

Related Questions