Implementing OAuth OpenID Connect with Laravel
I write this as a Laravel extreme novice.
I've been thinking of a project where one would need to share logins across subdomains (philosophy would be the same for domains I'd assume?), and I found Xero's implementation of OpenID Connect to solve the issue very gracefully.
You are first directed to login.xero.com, and on success are then directed to your dashboard at go.xero.com
Visiting any of the other subdomains, for example "reporting.xero.com" will automatically redirect to login.xero.com and redirect back to reporting.xero.com once the authentication is verified.
It also handles expired logins gracefully as well. Where you get a popup to enter your credentials immediately upon expiry (from whichever subdomain you're currently in), rather than trying to submit data, getting an error, which leads to losing what you tried to submit.
This video was very useful in understanding the process: https://www.youtube.com/watch?v=996OiexHze0 and Laravel already has all the underlying architecture built in. I just don't know if there is an implementation of OIDC. As all of token based authorization revolves around implementing an API rather than purely for authenticating across applications.
Any insights on how the login server and the other servers would be structured would be greatly appreciated :)
Thanks!
Please or to participate in this conversation.