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

Email OTP login with Okta mobile swift ‘OktaDirectAuth’ #186

Closed
cesmejia opened this issue Apr 10, 2024 · 3 comments
Closed

Email OTP login with Okta mobile swift ‘OktaDirectAuth’ #186

cesmejia opened this issue Apr 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@cesmejia
Copy link

Describe the bug?

I'm working with the OktaDirectAuth library… I was wondering if this library supports entering en email opt code to log in ‘natively’ (without WebAuthenticationUI).

It looks like email does not count as OTP (and probably neither SMS), an email OTP never works but if you try Google authenticator or Okta verify, they work without any issues…

What is expected to happen?

Using OktaDirectAuth:
When getting an OTP via email (via factors/verify API), you should be able to log in.

What is the actual behavior?

I just tried using the Okta Authentication API to send a OTP via email ({{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify). I’m getting the code but when I try to use that code on the Okta-mobile-swift OktaDirectAuth app it says the OTP is incorrect

53aa3fde3d467d92744c0e9b448c9101a144e8cd_2_308x500

Reproduction Steps?

  1. Run the DirectAuthentication demo from the samples
  2. Send a OTP code via email using the Okta factors API: ({{url}}/api/v1/users/{{userId}}/factors/{{factorId}}/verify)
  3. In the app, Select 'One-time-code'
  4. Check you email and get the code
  5. Click the Sign-In button
  6. You get an error alert: 'otp' provided is either empty or incorrect

Additional Information?

No response

SDK Version(s)

1.7.1

Build Information

No response

@cesmejia cesmejia added the bug Something isn't working label Apr 10, 2024
@mikenachbaur-okta
Copy link
Contributor

@cesmejia In this case the otp option refers to a time-based OTP code used by various authenticator apps (see the OTP primary factor SDK docs and the underlying server API documentation).

For SMS verification you'd want to look at the OOB (aka "out-of-band") authentication factor, using the SMS OOB Channel.

That should do what you want. If you want to test the workflow in your own environment, you can try the DirectAuth sample application.

@cesmejia
Copy link
Author

cesmejia commented Jul 12, 2024 via email

@mikenachbaur-okta
Copy link
Contributor

@cesmejia Email would be considered an OOB factor, similar to Phone, but it is not currently supported by the Direct Auth server APIs. As soon as support is introduced on the server however, those capabilities will be exposed in this SDK at that time.

Please feel free to "watch" this project to be notified of upcoming releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants