So the login flow we have now works great in most situation. But for example doesn't work that great with special SSO or 2FA methods. Take U2F, Smart cards etc.
For this I would propose an alternative flow that can be used.
Click here to login in your browserPlease close this window and return to the desktop clientAt step 2 above the server will query a capability of the server that tells it what flow to use
At step 3 the client will submit a POST request to <server>/login/ng and obtain
polltoken (a long 128 char token)<server>/login/ng/flow/<logintoken> this login token is also random (32 chars)The whole login now needs to be completed within 15 minutes. After that both tokens are invalid and the flow has to be started again.
The client will now regurally (every 5 seconds) do a POST to <server>/login/ng/poll with the polltoken.
Once the authentication in step 6 is successful this will return the
Once step 6 is completed the logintoken becomes invalid
Once the server has obtained the authentication details the polltoken also becomes invalid
CC: @MorrisJobke @nickvergessen @ChristophWurst @blizzz @schiessle
Ah one thing that comes to mind. We need to do some public key stuff to ensure that the apptoken is not stored in plain text in the db.
So
This is similar as how we handle the apptokens with public keys.
/login/ng/poll
How about using a version number instead of ng? For future iterations this will be better.
/v1/ is what all other apis use as scheme
Most helpful comment
/v1/is what all other apis use as scheme