Open Tylerflick opened 8 years ago
I think supporting "code id_token" may warrant discussion. I don't know that it would be my highest priority.
In order to be able to handle implicit flows in the library, the following would be required:
A stop-gap solution would be to set the redirect URI to a page that can parse out the fragment values and forward them to the app via a custom scheme. Without PKCE this is still vulnerable, however.
Quick update. I ended up wrapping the android Uri class using a composition style pattern. The new Uri class internally takes care of parsing the either the fragment or query parameters. This has ended up working as a drop in replacement with no issues so far.
Excellent work! So, it sounds like you get the fragment from the browser no problem, so I should open an issue to support parsing the response out of the fragment in RedirectUriReceiverActivity. It's good to know you were able to solve your problem without having to change the library too.
Unfortunately I did have to make a few small changes to the library. The Uri wrapping class had to replace the original android.net.Uri class in :
The wrapping class keeps the same API though so it was more of just swapping out of the types in the appropriate method signatures.
If you would like I can make a fork of the library and push the changes.
Ah, I understand. So, it sounds like I should just make the change in RedirectUriReceiverActivity to support extracting the response from the fragment, to avoid a more complex solution of priming separate activities for query vs fragment responses.
Just pushed my proof of concept here.
using a app link is really only required if you are directly returning token.
That we should discourage people from doing.
For code id_token a custom scheme redirect would work, with the caveat that the id_token could leak. The problem with leaking the id_token is if the app is passing the id_token to a backend for authentication (As google recommends in some cases) then you get into trouble.
Is there really a use case for something other than code response type?
While the hybrid response modes (they are not implicit) like code id_token are possible they may create security issues as the responses are not protected by PKCE.
John B.
Hi. Can I ask for some clarification please? Is hybrid flow i.e. "code id_token" with PKCE and a custom scheme supported or not? It is a recommended flow in the IdentityServer docs, but it doesn't appear to work, and this issue just ends with the rhetorical question above.
@iainmcgin would love your updated thoughts 2 years later? :-)
Hello I would also love to know if response_type=code id_token would work, because I am using the flutter AppAuth package and it sadly does not.
Are there any plans to support the Hybrid Flow described in section 2 of http://openid.net/specs/openid-connect-implicit-1_0.html?