Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the transaction id necessary? #199

Open
apichick opened this issue Mar 7, 2017 · 1 comment
Open

Why is the transaction id necessary? #199

apichick opened this issue Mar 7, 2017 · 1 comment

Comments

@apichick
Copy link

apichick commented Mar 7, 2017

Could you clarify why the transaction id is necessary? Wouldn't it be enough to check if the user is logged in?

@smaclell
Copy link

smaclell commented Aug 26, 2017

Some oauth workflows require multiple requests and responses with the user.

One example of this is when user consent is required. The first request would show a dialog asking for consent which then posts back to a second route. That second route needs all the information from the first request. Since some of the information may be sensitive, the framework saves it all for you as a transaction within the session. It is then reused within the second request via something like server.decision().

This is explained in the source code at:

* Obtaining authorization via OAuth 2.0 consists of a sequence of discrete
* steps. First, the client requests authorization from the user (in this case
* using an authorization server as an intermediary). The authorization server
* conducts an approval dialog with the user to obtain permission. After access
* has been allowed, a grant is issued to the client which can be exchanged for
* an access token.

I hope that helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants