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

oauth2 token collecting #63

Closed
lucwillems opened this issue Jun 6, 2018 · 4 comments
Closed

oauth2 token collecting #63

lucwillems opened this issue Jun 6, 2018 · 4 comments
Labels

Comments

@lucwillems
Copy link

Hi,
i'm using your tool to test some internal api servers we are building and there using oauth2 tokens using implicit flow.

i have setup the oauth2 configuration , and as redirect URL i point it to a personal public test site (https://t-m-m.be) which if it sees the oauth2 token , dumps the value for verification.

now the oauth2 provider is a spring based application which includes the token as a URL fragment
example : https://t-m-m.be/#access_token=eyJhbGciOiJIUzI1NiIs.....

the tool doesn't seems to get the token , and closing the login window it reports this error :

Window was closed before target url was loaded.

is there some config missing or something else ...

@lucwillems
Copy link
Author

lucwillems commented Jun 6, 2018

some extra remark ,
spring adds the token as a url fragment together with some extra fields as URL parameters,
as the token is large (+/- 780 bytes) you have to scroll to the end of the url to see additional &=
maybe this is unexpected by the tool ?
currently we have something like this in the redirect url

https://t-m-m.be/#access_token=<long token>&token_type=bearer&expires_in=86399

so more than the token itself

@frigus02 frigus02 added the bug label Jun 10, 2018
@frigus02
Copy link
Owner

Hi, thanks for taking the time to report this. Putting the token in the URL fragment, together with the token type and expiration time is how OAuth 2 wants you to do it (if I remember correctly). And this is also what RESTer supports, or is supposed to support.

There has to be a bug in RESTer, which breaks the token detection for some reason. I will have a look at it.

frigus02 added a commit that referenced this issue Jun 17, 2018
@frigus02
Copy link
Owner

I could reproduce the issue if the specified redirect URI has an empty path, i.e. ends with the top-level domain and has no trailing slash. It should be fixed in the next update.

@frigus02
Copy link
Owner

Version 3.8.2 is out and contains the fix.

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

No branches or pull requests

2 participants