I have a running Vue SPA with a Laravel breeze/sanctum backend. Everything works fine. I need to add another way to authenticate. It is an OpenID Connect (keyclock compatible) auth provider.
I have seen packages for Keycloak. Some use a JWT token, which I don't want.
I need the user to authenticate using OpenID Connect and then get logged and use a normal sanctum session.
Does anyone know a package that could handle that ?
@jlrdw isn't it an external auth service ? If so, it is not an option to rely on a third party service.
I need the user to be able to register using the auth provider, putting it's auth id from the auth provider into a database field on callback.
Then when logging with the provider, on callback, the database field is checked and the user get authenticated using normal session.
and the user get authenticated using normal session.
Why do you need oauth2 when authenticated using normal session
An API would make sure credentials match and assign a token for use.
Sorry if I am not understanding your setup. But using normal session just sounds like
a normal web app and not an API.
You read this:
In order to authenticate, your SPA and API must share the same top-level domain. However, they may be placed on different subdomains. Additionally, you should ensure that you send the Accept: application/json header and either the Referer or Origin header with your request.
You use cookies yes, but I still don't understand why you also want the oauth2.
You have to follow the SPA part of the documentation.
@jlrdw I already have my Vue PWA running and have User/Password authentication using Breeze, so, sessions. I based my work on this : github.com/faisalfjri/breeze-vue-api
I just want to add another way to login/register using a third party OID Connect identity provider.