Can I use Azure B2C as authentication through openid or tokenbased plugin?

I’m new to azure and weweb, I have registered an application to azure and got some endpoints and client secret to put in the openid fields, I have also tried token based plugin but I can’t seem to make it work.

Hi @Tom :wave:

I’m not familiar with Azure specifically but it seems you should be able to use OpenID with an Azure app: OAuth 2.0 and OpenID Connect protocols on the Microsoft identity platform - Microsoft Entra | Microsoft Learn

This user docs article about OpenID might help you get started though we use Google OAuth as an example.

That said, looking at the Microsoft article shared above, it could be that it works with the token-based plugin as well.

If you want to go down that route, I think the video in this article will help a lot. It explains the entire user login flow using a bearer token.

If you get stuck, don’t hesitate to share a screen recording showing us how things are setup on your side, and where you get errors. It’ll helps us figure out what’s working and what needs updating.

I have tried on the openid plugin and I’m getting this error (Error: Network Error at s.onerror (https://cdn.weweb.io/components/01af5352-af71-4382-844b-2ec141ff243b/83be2748-aa22-4d69-9812-1cefc8f2c1aa/dist/manager.js:1:18579) at XMLHttpRequest.sentryWrapped (https://browser.sentry-cdn.com/7.45.0/bundle.min.js:2:38971)"
message: “Network Error”)

Hi @Tom :wave:

Unfortunately, it’s very hard to help out without the full context of your setup.

Perhaps you could share a video walking us through how things are setup in WeWeb, and in Azure?

i have manage to make it work, the sign in is working but the logout is not working it seems microsoft wants a redirect uri included in the logout request. Can i include a logout uri in the logout flow of openid?

Hi @Tom :wave:

It should work with the URL of the page you chose to redirect unauthenticated users to when you setup the OpenID plugin:

Hi @Tom ,

I am also attempting to connect to azure AD and getting this exact exception. How did you overcome this?