Okta swift mobile - iOS native passwordless (OTP): Recommended way to register and to send OTP email

Hi, I’m trying to go passwordless and I’ve found that the Okta-Sign-In widgets works very well.

However, before going all in with the Okta-Sign-In Web Widget, I’m trying to check if an iOS native passwordless approach is feasible.

I found the OktaDirectAuth (Okta-swift-Mobile) sample which lets you sign in with OTP passwords from different providers.

When working with OktaDirectAuth, my questions are:

  1. What is the recommended way to register a new passwordless user? Is it via the Okta Users API (implementing it on a server) and adding the user to a passwordless group?

  2. How am I able to send a login OTP password to be used in OktaDirectAuth OTP login? Is it also via some method from the Authenticate Okta API?

Thanks!

Update:

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…

Update: 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…

1 Like