Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OAuth2: Why do we need redirect URI for user agent

I recently made a small app with webserver flow. Now I am trying user-agent example. I am wondering why do we need to define a redirect-uri in user agent flow.

I am working with Saleforce.com api:

http://wiki.developerforce.com/page/Digging_Deeper_into_OAuth_2.0_on_Force.com

redirect_uri The authorization server will respond with a redirect to this URI. This parameter must match your application's configured callback URL.

like image 336
Asad Iqbal Avatar asked May 15 '12 20:05

Asad Iqbal


1 Answers

In a user agent flow, the redirect_uri is the location that the user gets redirected to after they click Approve on the approval page. Appended onto the redirect_uri are a hash fragment, and then the access_token, instance_url, and other oauth parameters.

like image 152
willywu Avatar answered Sep 28 '22 03:09

willywu