Identityserver4: implementing passwordless login through customization of idsrv

Created on 4 Nov 2016  路  7Comments  路  Source: IdentityServer/IdentityServer4

Hi, is it possible to implement a passwordless login with custom grant and a custom login view?

By passwordless I mean that by visiting the custom login view and specifying your email, idsrv sends you an email with a magic link containing a TOTP, clicking the magic link goes to the custom grant validator and after validating the TOTP, idsrv redirects you to the client application.

Is that a scenario that can be supported through customization/extension of idsrv?

thanks,
Stephane

question

Most helpful comment

All 7 comments

I think so, in fact what you do for authentication a user is up to you.

What you could do is:

  • in the AccountController.Login (GET) let the user enter his email address.
    Be sure to keep a reference to the returnUrl, this is the url that you should redirect to when a user is authenticated (it links to /connect/authorize/login?...)
  • Send the user a link with your TOTP and let it link to a custom action in your AccountController
    In that action validate the TOTP and redirect then to the previous returnUrl and voila, the user is logged in. Similar to how AccountController.Login (POST) works

That's how I would do it.

@khelben thanks for your answer. I did manage to leave out that I'm currently on v3 with no immediate plans of moving to v4 though. So I'm not sure that solution is 100% applicable to v3?

So why are you posting here then?

I'm sorry, I misread the contributing guidelines page. Obvious mistake on my part.

no prob - identityserver3 has its own issue tracker - but given the nature of the question, you are better off at StackOverflow

For IdentityServer3
https://stackoverflow.com/questions/tagged/?tagnames=identityserver3&sort=newest

For IdentityServer4
https://stackoverflow.com/questions/tagged/?tagnames=identityserver4&sort=newest

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eshorgan picture eshorgan  路  3Comments

Aravind1729 picture Aravind1729  路  3Comments

krgm03 picture krgm03  路  3Comments

wangkanai picture wangkanai  路  3Comments

leastprivilege picture leastprivilege  路  3Comments