You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, some API examples require the user to be specifically authenticated to a particular service. For example, the Facebook example will not work if the user is authenticated with Google+. We should have a method that will redirect the user to be authenticated for the proper API method (i.e, if the user is currently logged in through Facebook and wants to use the Dropbox API, we should re-direct the user to be authenticated through Dropbox). This should be done for all the API examples that require authentication.
Also for the examples done by @mk200789, I propose we change the re-direct url structure like this:
Let's say the user clicks the Twitter example, but is not authenticated with Twitter. The user is redirected to authenticate with Twitter, and upon successful authentication the user is redirected to http://localhost:8000/hackathon/. Instead, we should then redirect the user to the API example they requested to view (Twitter in this case). An implementation to do is:
Create separate callbacks for each API example. For example, Twitter will redirect the user (after authentication) to a url: http://localhost:8000/hackathon/oauthcallback/twitter. On this view function, we now redirect the user to the Twitter example they requested to use.
As such, authentication views such as Dropbox would have a redirect_uri of http://localhost:8000/hackathon/oauthcallback/dropbox, and would properly re-direct the user to the API example. This is perhaps a solution to the first problem on top, where if the user isn't authenticated with the right service, we re-direct them to be authenticated, then bring them back to the API they requested to view.
Questions and comments are welcome. This would greatly improve the user flow, as right now it requires the user to log out and log back in with the proper method, and would remove having the user go back to the main page after authenticating for an API examples (as shown by the Twitter example).
The text was updated successfully, but these errors were encountered:
Currently, some API examples require the user to be specifically authenticated to a particular service. For example, the
Facebook
example will not work if the user is authenticated withGoogle+
. We should have a method that will redirect the user to be authenticated for the proper API method (i.e, if the user is currently logged in through Facebook and wants to use the Dropbox API, we should re-direct the user to be authenticated through Dropbox). This should be done for all the API examples that require authentication.Also for the examples done by @mk200789, I propose we change the re-direct url structure like this:
http://localhost:8000/hackathon/
. Instead, we should then redirect the user to the API example they requested to view (Twitter in this case). An implementation to do is:http://localhost:8000/hackathon/oauthcallback/twitter
. On this view function, we now redirect the user to the Twitter example they requested to use.Dropbox
would have aredirect_uri
ofhttp://localhost:8000/hackathon/oauthcallback/dropbox
, and would properly re-direct the user to the API example. This is perhaps a solution to the first problem on top, where if the user isn't authenticated with the right service, we re-direct them to be authenticated, then bring them back to the API they requested to view.Questions and comments are welcome. This would greatly improve the user flow, as right now it requires the user to log out and log back in with the proper method, and would remove having the user go back to the main page after authenticating for an API examples (as shown by the Twitter example).
The text was updated successfully, but these errors were encountered: