I am trying to do user authentication using Okta with Passport.js.
Passport.js Okta strategies require the user to sign in using Okta page which authenticates the user. However, I want to do API-driven authentication. Is there a way to use API token/access tokens for user authentication with Passport?
For example: https://developer.okta.com/blog/2018/05/18/node-authentication-with-passport-and-oidc
This is close but also requires the user to sign in using Okta page whereas I want to do that programmatically using API token.
If I don’t use Passport.js, using okta-sdk-js might be close. But again how can you authenticate user without using the username and password and instead using api token maybe?
I have been trying to find a workaround since past few days and haven’t been successful.
Any help will be greatly appreciated! Thanks.
Summary: I am trying to use Okta with Passport.js for API-driven authentication and using token(s) for the user authentication, rather than the username and password.