V8-archive: 2FA - Two Factor Authentication Support

Created on 30 Oct 2018  ยท  10Comments  ยท  Source: directus/v8-archive

Hi,

I'm looking forward to secure this wonderful middleware system with 2FA - Two Factor Authentication at both levels API and Web if enabled.

Thanks

enhancement

Most helpful comment

Would we generate/manage this ourselves (over email), or use some library/service (potentially adds SMS too)?

Does anyone have any thoughts or recommendations?

Yes, I did. ๐Ÿ˜
No need for any services I just use this simple and nice one file library PHPGangsta/GoogleAuthenticator which is using OTP only. ๐Ÿค“

All 10 comments

In terms of input, this would mean that logging in requires a 6 char code (One Time Password OTP) generated by an authenticator application.

{
  "email": "[email protected]",
  "password": "password",
  "otp": "123456"
}

Would we generate/manage this ourselves (over email), or use some library/service (potentially adds SMS too)?

Does anyone have any thoughts or recommendations?

In terms of input, this would mean that logging in requires a 6 char code (One Time Password OTP) generated by an authenticator application.

{
  "email": "[email protected]",
  "password": "password",
  "otp": "123456"
}

Yes, 6 chars is enough for now and this could work. ๐Ÿ™‚
But, I prefer to split this into two requests not one. Like this:

  • First request:
{
  "email": "[email protected]",
  "password": "password"
}
  • First response:
{
  "challenge": "57eabcc4-dce0-427b-bfb0-f99b56c849df",
  "type": "otp",
  "hint": "null" # otp is null
  # "hint": "public-key" # for U2F
  # "hint": "+9xxxxxxxxxxxxx786" # for SMS
  # "hint": "[email protected]" # for Email
}
  • Second request:
{
   "challenge": "57eabcc4-dce0-427b-bfb0-f99b56c849df",
   "code": "123456"
}

After that the challenge should be delated and combined with expiration date.
This design will help us in the future to add more options like SMS, Email and U2F. ๐Ÿค“

Would we generate/manage this ourselves (over email), or use some library/service (potentially adds SMS too)?

Does anyone have any thoughts or recommendations?

Yes, I did. ๐Ÿ˜
No need for any services I just use this simple and nice one file library PHPGangsta/GoogleAuthenticator which is using OTP only. ๐Ÿค“

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

To achieve better clarity/visibility, we are now tracking feature requests within the Feature Request project board.

This issue being closed does not mean it's not being considered.

Hi,
I am currently working on implementing 2FA for login. Any pointers / specific parts of the documentation I should look at?

Hey @OscBacon โ€” that would be awesome!! ๐Ÿ˜„

@bjgajjar @hemratna โ€” any pointers on where this should exist within the code?

@benhaynes Thanks!
I am wondering too, could this be possible as an extension, similar to how SSO seems to be explained in the docs?

Not sure, but @bjgajjar should be able to help you here or on our Slack. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rijkvanzanten picture rijkvanzanten  ยท  3Comments

gitlabisbetterthangithub picture gitlabisbetterthangithub  ยท  3Comments

Nitwel picture Nitwel  ยท  3Comments

metalmarco picture metalmarco  ยท  3Comments

cdwmhcc picture cdwmhcc  ยท  3Comments