alfio-event / alf.io

alf.io - The open source ticket reservation system for conferences, trade shows, workshops, meetups
https://alf.io
GNU General Public License v3.0
1.42k stars 346 forks source link

OpenID authentication broken after Spring Security Upgrade #1380

Closed cbellone closed 3 months ago

cbellone commented 3 months ago

Discussed in https://github.com/alfio-event/alf.io/discussions/1379

Originally posted by **@TheKrystek** July 16, 2024 Hi, I've been struggling to setup authentication for public users. I'm using **keycloak** and alfio is started in dev mode (backend running on 8080 and frontend on 4200). I can create an account, then login, then BaseOpenIdAuthenticationManager.createOrRetrieveUser returns valid authentication. However when request is sent from angular app **/api/v2/public/user/me** to obtain user's identity object Authentication principal is always null. Since as far I can tell everything on keycloak side looks alight I suspect there might be something wrong/missing with alfio itself. I'd gladly get some pointers:)
cbellone commented 3 months ago

This should be fixed now. Please note that with the new implementation:

TheKrystek commented 3 months ago

Thanks a lot, I hope, that I'll have time later this week to take a look. Really appreciate your prompt fix :)