-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Similar issue to
We just had a coding session with @thhck around
https://github.com/Liquid-Surf/fedcm-demo
It works for me in regular Chromium Version 143.0.7499.146 (Official Build) (64-bit)
after enabling FedCM with IdP Registration support and FedCmLightweightMode chrome://flags/
Live playground:
- https://fedcm-client.liquid.surf/ (has some useful logs in devtools console)
- https://fedcm-server.liquid.surf/ (create account, log out, go to login page again)
The most relevant part is in
https://github.com/Liquid-Surf/fedcm-demo/blob/main/packages/client/src/solid.js
In short Browser FedCM API needs
- clienId
- PKCE
- challenge
- method
- state
On success it returns an object with
- authorization_code
- issuer
So instead of redirecting and handling redirect, we need to call browser api and use the return value.
I would suggest starting with URL ClienID and get it working before investigating DynReg.
import { FedCMSession } from '@uvdsl/solid-oidc-client-browser'
// Create a session
const session = new FedCMSession({
client_id: 'https://fedcm-client.liquid.surf/clientid'
})
try {
await FedCMSession.login()
} catch (err) { //handle err }There rest should be the same as far as i can tell at this moment.
P.S. We will do another session on Thursday possibly using one of apps that already use solid-oidc-client-browser https://github.com/elf-pavlik/mallory
Even some helpful tips here would be great and maybe at the end someone would be interested to make a proper PR here.