Skip to content
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

One Time Password example #116

Merged
merged 7 commits into from
Oct 25, 2024
Merged

One Time Password example #116

merged 7 commits into from
Oct 25, 2024

Conversation

adam-fowler
Copy link
Member

@adam-fowler adam-fowler commented Sep 26, 2024

Standard username, password authentication which can be extended to include a TOTP token input

This uses the session PR in hummingbird-auth

@adam-fowler adam-fowler marked this pull request as draft September 26, 2024 07:39
@adam-fowler adam-fowler requested a review from Joannis September 26, 2024 07:39
Comment on lines 36 to 37
let computedTOTP = TOTP(secret: otpVerificationSession.secret).compute(date: .now - 15.0)
let computedTOTP2 = TOTP(secret: otpVerificationSession.secret).compute(date: .now + 15.0)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very much a nit, but theoretically the distance between .now the first and second time can theoretically change enough to create an issue. I don't think we care for an example, but wanted to give you that info.

Copy link
Member

@Joannis Joannis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved-ish - we need to wait for hb-auth and those discussions

@adam-fowler adam-fowler marked this pull request as ready for review October 16, 2024 17:41
@adam-fowler
Copy link
Member Author

Updated to include latest from auth.

@adam-fowler adam-fowler merged commit ba9501f into main Oct 25, 2024
1 check passed
@adam-fowler adam-fowler deleted the auth-otp branch October 25, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants