Menu

1 / 2

Adding WSO2 Sign-In to Inventra, My Laravel Inventory App

DEV Community: authentication·Oshadha Gunawardhana·13 days ago
#5b0ID6JF
#devtoauthentication#devto#dev#wso2#inventra
Long article (658 words) — no AI summary yet.
Reading 0:00
15s threshold

I built Inventra to manage products, stock, customers, and sales. It already had an email and password login. For this update, I wanted to see how an external identity server could handle sign-in while Inventra kept control of who could access the app.

I added a Sign in with WSO2 button using WSO2 Identity Server 7.3.0 and OpenID Connect. I tested it on Windows with Laragon and MySQL. The original Inventra login is still available.

Inventra on GitHub · Pull request #1

Inventra login page with the Sign in with WSO2 option.

How sign-in works

The user clicks Sign in with WSO2. Inventra sends the browser to WSO2 with an authorization request and a PKCE challenge.

After the user signs in, WSO2 returns an authorization code to Inventra’s callback. Inventra checks that the response matches the sign-in request in its session and exchanges the code using the original PKCE verifier.

Inventra verifies the ID token’s signature and claims, including the issuer, audience, expiry, and nonce.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.