Is PKCE the right workflow for me?

Ready to post? :mag: First, try searching for your answer.
Hi, I just need some guidance on if I’m going down the right path here. I’m an experienced developer, but this is my first time integrating a third party auth provider.

My app is a native app and web page, written using the .Net MAUI Blazor Hybrid and web app stack. It’s communicating with the back end API. The user will log in via the front end, and the front end will need to also authenticate with the API backend and pass user data from the front end to the API.

Is the PKCE workflow what I need to be implementing? Is this the best guide for me to be following? Add Auth0 Authentication to Blazor Hybrid Apps in .NET MAUI

How exactly would the front end authenticate with the backend, will it be passing a bearer token to the API?

Thank you!

Hi @chris60,

Welcome back to the Auth0 Community and thank you for your post.

Given that you are using a native app that wants to communicate with your backend API using the Authorization Code Flow with PKCE is exactly the way to go. I would recommend following this documentation on implementing PCKE in this scenario, which also provides code examples.

Also a sample of how this architecture looks like can be found in this article about Mobile Applications with API.

Indeed, for the frontend to interact with your backend, so to call your API from a native/mobile application, the application must pass the retrieved Access Token as a Bearer token in the Authorization header of your HTTP request.

Combing the documentation articles mentioned above with the integration you mentioned already about Blazor Hybrid Apps in .NET MAUI should help add authentication to your project.

Thanks,
Remus