Jimmyt1988
Jimmyt1988

Reputation: 21146

OAuth 2 requires a redirect uri, what would that be for windows phone 8?

I have just realised that OAuth 2 authentication requires a redirect uri to send some refresh tokens back to. I have no idea what uri I should be using for windows phone 8. I have seen something about uri scheme? Does anyone know what has got to be done?

I have placed

"http://localhost/"

as the redirect uri as this blokey does

https://github.com/spring-projects/spring-net-social/blob/master/examples/Spring.OAuth2WindowsPhoneQuickStart/Spring.OAuth2WindowsPhoneQuickStart/App.xaml.cs

Upvotes: 0

Views: 2792

Answers (2)

Sam Ngugi
Sam Ngugi

Reputation: 1172

Try this it worked for me urn:ietf:wg:oauth:2.0:oob

Upvotes: 0

Eugenio Pace
Eugenio Pace

Reputation: 14212

You should normally try to avoid storing any secrets on a device. Using the "implicit flow" instead with signed tokens.

See this example: https://github.com/auth0/Auth0.Windows8.Cs/blob/master/Auth0Client/Auth0Client.cs or this one specifically for Win Phone 8: https://github.com/auth0/Auth0.WindowsPhone/blob/master/Auth0Client/Auth0Client.cs

Note: the client secret in those examples is used for something else.

The callback is just a URL that the browser in your app (the endUri parameter in WebAuthenticationBroker if using Win8) will recognize as the "end of the flow". "localhost" will do if your code recognizes it as the completion of the transaction.

Upvotes: 1

Related Questions