-
Notifications
You must be signed in to change notification settings - Fork 24
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
API based login flow #48
base: master
Are you sure you want to change the base?
Conversation
…ing. Default to webview for backwards compatibility
ping @ullgren |
@bernljung Thanks for the PR and the ping. Will have a look at it. |
I have a question in this PR. Lat say we have userid based Authentication along with Bankid, Now I want to Enable Profile verification flow and linking so that one user can login with Email and BankId both. How it will be possible. CC @ullgren |
@harikant-lftt To allow login with either username/password or BankID you'd use a browser flow with a Note that showing a form instead of using the And as for the |
There always possibility to enable profile review, let assume we want capture user email from KC, or may tomorrow we want to enable OTP feature or KC how we will able to do it. This solution will only work when we are sure other than BANKID authentication we are not going to use any other KC IAM feature. |
@harikant-lftt I see your point with regards to compatibility. 👍 But at the same time, it would still work to use different auth flows based on the client used so you can get the behaviour you need for web based clients. We could also tweak the I also think that given how BankID is being used in a very large majority of applications, it is not an issue to NOT support adding things like OTP. It is simply not a use case when you have BankId, and proper documentation that covers what is and what isn't supported for the api flow should be sufficient in my opinion. I have never seen BankId being used along side alternative IdP's. But IF that would be the case, we could also add a switch to be able to turn on/off the API flow from the IdP configuration so that it won't be triggered by mistake, though unlikely. Maybe @ullgren has some input on this matter. |
Thoughts @harikant-lftt @ullgren ? |
I don't really think this is valid. There seems to be a movement in society to roll out Freja eID+ (that has OIDC support) alongside BankID as an alternative. But I guess that can be worked around using multiple clients? |
This PR adds support for an API based login flow. This is needed for certain clients such as native iOS and Android apps, to avoid the extra step of opening a webview for Bankid login. It could also be useful for more advanced web apps that wants to be in full control of their UI elements.
The existing endpoints for
start
,collect
,done
andcancel
are mirrored with API based equivialents that returns JSON instead of the HTML template.Which flow to use is decided by the client application by using the querystring
bankid_login_flow
when calling the initial/auth
endpoint. It defaults to the current flow (which I callwebview
) for full backwards compatibility.Not 100% sure of the best way of how the choice of login flow is to be made, a few ideas I had:
kc_idp_hint
querystring. Would require separate configurations which may be a good or bad thing as it gives some extra control but it adds some potential work.Feedback appreciated! 🙂
resolves #43