Conversation
|
We should probably keep https://github.com/aaronpk/oauth-fedcm-profile in mind. |
src/core/AuthorizationCodeGrant.ts
Outdated
| // @ts-ignore | ||
| const fedCMissuer = new URL(credential.configURL).origin + '/' | ||
| // @ts-ignore | ||
| return buildRedirectUrl(credential.token, params.state, fedCMissuer) |
There was a problem hiding this comment.
using state this way clearly makes no sense, something we need to investigate.
Co-authored-by: mrkvon <mrkvon@protonmail.com> Co-authored-by: Christopher Mühl <toki@toph.so> Co-authored-by: bourgeoa <alain.bourgeois10@gmail.com>
|
@uvdsl what do you think about refactoring your code in a way that allows creating separate package, for example solid-oidc-fedcm-rp which has this package as dependency. As we see here the difference is using redirect vs. using FedCM api in the browser. It should be possible to isolate the redirect logic in a way that the other package uses browser api instead of the redirect 🤔 EDIT: fedcm-rp package should still allow to use the original redirect flow as a fallback! |
|
9de4229 improves a bit to const client_id = 'https://zestful-keely-sootily.ngrok-free.dev/id.jsonld'
const session = new Session({ client_id })
await session.fedCM() |
|
ccd2f0c untangles FedCM further, I'll leave it here unti further feedback I don't think this projet has any formatter, recently I started using https://oxc.rs/#feature-formatter It should be easy to test it with https://github.com/elf-pavlik/mallory/tree/fedcm/cuckoo
On success nothing visible happen, but one can reload to see mallory message that it aborted the exploit attempt. |

Followup to #29
We made it today with @mrkvon @tophcodes, and @bourgeoa
heavily copy & paste from https://github.com/Liquid-Surf/fedcm-demo/tree/main/packages/client by @thhck
I will push later code using it but in short
idpis not used by FedCM and is later extracted from what browser API returns, for now we still passed it to avoid making more changesIt only works with URL Client ID in our case
It took us last 30 min to cheat our way out of trailing
/errors 🤦