Open yodatak opened 8 months ago
Sorry, I've no idea. OAuth implementations vary a lot from service to service. Often you need to be able to dig right into the requests and responses to debug this. I'm not able to do this at this for you at this time. Maybe someone else can help?
I made it work :tada: ! I plan to make a documentation to help people to use it ( i will close the issue as soon a i made the PR with documentation)
I made it work 🎉 ! I plan to make a documentation to help people to use it ( i will close the issue as soon a i made the PR with documentation)
Could you share your config? I'm having a hard time getting it working with Keycloak for OIDC authentication.
For Authentik
@atomicthumbs
in .env file in loomio conf
#- `OAUTH_AUTH_URL` is used to specify the auth endpoint, for example `https://sso.yourdomain.com/realms/YourRealm/protocol/openid-connect/auth`.
OAUTH_AUTH_URL=https://sso.XXXXXXXXXXXXXXXX.org/application/o/authorize/
#- `OAUTH_TOKEN_URL` is used to specify the token endpoint, for example `https://sso.yourdomain.com/realms/YourRealm/protocol/openid-connect/token`.
OAUTH_TOKEN_URL=https://sso.XXXXXXXXXXXXXXX.org/application/o/token/
#- `OAUTH_PROFILE_URL` is used to fetch the user's profile data, for example `https://sso.yourdomain.com/realms/YourRealm/protocol/openid-connect/userinfo`.
OAUTH_PROFILE_URL=https://sso.XXXXXXXXXXXXXXXX.org/application/o/userinfo/
#- `OAUTH_SCOPE` is the list of scopes passed in the auth request, for example `openid email profile`.
#https://sso.XXXXXXXXXXXX.org/application/o/loomio/.well-known/openid-configuration
OAUTH_SCOPE=openid email profilegroupless
#- `OAUTH_APP_KEY` is what OIDC refers to as the Client ID. For example, `loomio`.
OAUTH_APP_KEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#- `OAUTH_APP_SECRET` is what OIDC refers to as the Client Secret. It's a long string of letters and numbers and other characters.
OAUTH_APP_SECRET=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#- `OAUTH_ATTR_UID` specifies which user profile field is used for Loomio's internal unique identifier for this user. For example, `email`.
OAUTH_ATTR_UID=email
#- `OAUTH_ATTR_NAME` specifies which user profile field is used for Loomio's displayed name, for example `name`.
OAUTH_ATTR_NAME=name
#- `OAUTH_ATTR_EMAIL` specifies which user profile field is used for the Loomio account email address, for example `email`.
OAUTH_ATTR_EMAIL=email
#- `OAUTH_LOGIN_PROVIDER_NAME` is the label used for the SSO login button. The user will see this value when they're prompted to log in using SSO. For example, `Your Domain SSO`.
OAUTH_LOGIN_PROVIDER_NAME=My sso conf
#For the ATTR variables, if you're not sure what your OAuth provider is returning, you can attempt a login and check the Loomio logs to see the response.
and if needed i could add authentik conf later !
I add also a scope without group in profile because loomio don't support it yet
thank you!
Hi with podman-compose and authentik SSO i got this error:
https://loomio.XXXXXXX.org/oauth/authorize?code=968cf7d876ec42ff91XXX518a388&state= Translation missing: fr.Could not connect to oauth!
the curl command to reproduce
curl 'https://loomio.XXXXX.org/oauth/authorize?code=186711527b6d4aca9d386bcc0f96c78b&state=' --compressed -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,/;q=0.8' -H 'Accept-Language: fr' -H 'Accept-Encoding: gzip, deflate, br' -H 'DNT: 1' -H 'Alt-Used: loomio.XXXXX.org' -H 'Connection: keep-alive' -H 'Cookie: _loomio=FCF%2B7fNwRA6UrMm%2B6yGNRT7pSioAcWtm4kBp6Mag4OfSRdOJoTuTdH4dz10kO%2FTI0cmARyu7flDuEPZEbjWY0eHbczWG9VrFwsxnPQyh50L1Ju3iWi6HltXGp5dr1fkxOiVRL40RfZeI2wokmwn7Z5reStU13WLcwH40p5zThl%2FmnOdZ%2BiLhT3obCd4ipEdHA6GnARXjufhUPoEJaXXXXXXo32C23niDfOyaAZUCasggs%2FWDFPfppjcELw5q6TaOFQu8rqz59wIw%3D%3D--aFxepjU9k4aTj1f%2F--Hq3dl7LljElgKWPx6FpUaQ%3D%3D' -H 'Upgrade-Insecure-Requests: 1' -H 'Sec-Fetch-Dest: document' -H 'Sec-Fetch-Mode: navigate' -H 'Sec-Fetch-Site: same-site' -H 'Pragma: no-cache' -H 'Cache-Control: no-cache' -H 'TE: trailers'
exemple of JWT of authentik
my config of loomio
and here the loomio logs
How to debug this ? Anyone that make authentik work ?