How to authenticate user from app in device flow rather than using browser?

I am following the instruction to setup device flow authentication: Call Your API Using the Device Authorization Flow.

It works fine based on the steps in the doc. But it uses browser to open the verification_uri_complete received from /oauth/device/code post response.

My use case is to let the user scan a QR code which will open an app on their mobile. The app is built by me. The app is already authenticated with the user’s credential via using the auth0 sdk. So the app has got the access token and refresh token. How can I use the existing token from the app to authenticate the device flow? I don’t want the user to login again if he already logged in to the app.

Hi @joey

Thank you for posting your question on the community!

I am sorry about the late reply to your inquiry.

Unfortunately, in order for the Device Authorization Flow to start, the user needs to start the authentication process. Even if the user is already authenticated, the access and refresh token cannot be used to initialize the device authorization flow since it is a part of the authentication process.

If you have any other questions, feel free to leave a reply or post again on the community!

Kind Regards,
Nik