Skip to content

Refactor OAuth integration#189

Open
florianmouro wants to merge 6 commits intoCETEN-OpenBar:mainfrom
florianmouro:feat/auth-rewrite
Open

Refactor OAuth integration#189
florianmouro wants to merge 6 commits intoCETEN-OpenBar:mainfrom
florianmouro:feat/auth-rewrite

Conversation

@florianmouro
Copy link
Copy Markdown

@florianmouro florianmouro commented Mar 31, 2026

Summary

Refactor the OAuth integration in the project. Mostly here to isolate the current relevant code related to OAuth to rewrite later all authentication on the server side and allow easier integration of other OAuth provider.
It should fix broken authentication with broken redirects.
Removes /auth/qr which was not implemented fully and is not compatible with the refactor.
This PR is not supposed to change the behavior of the server compare to the current implementation, and so will make more sense after the refactor of the authentication middleware.
The project currently does not handle errors in a proper way, so this PR introduces the necessary structs to do it afterwards but does not use them.


Related issues :

None

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Documentation (update or create documentation)
  • CI/CD
  • Other
  • Breaking change (fix or feature that would cause existing functionality to change)

@yyewolf
Copy link
Copy Markdown
Member

yyewolf commented Apr 1, 2026

{C1DDA538-DEC5-447D-9A7A-F2910FBADC8A}

Du coup on perd ça ? Perso de mon côté ça marche je suis pas certain de comprendre

Removes /auth/qr which was not implemented fully and is not compatible with the refactor.

La feature de base c'était pour permettre de lier / update son compte bar <=> compte tn.net

Après si c'est le souhait, il faut modifier le front pour retirer la feature aussi

@florianmouro
Copy link
Copy Markdown
Author

florianmouro commented Apr 1, 2026

Nan, normalement ça on garde. /auth/qr ça semblait être une méthode non achevée pour se connecter avec un qr code sans avoir à poser la carte. Turns out le code concerné (dans borneQr) mettait une valeur dans un cache qui était jamais querry et envoyait via un websocket un objet JSON qui était jamais traité.
https://github.com/CETEN-OpenBar/bar/blob/main/backend/api/borneQr.go#L161
Normalement y avait également aucun moyen d'y aller depuis le front.

@yyewolf
Copy link
Copy Markdown
Member

yyewolf commented Apr 2, 2026

Ah ouais j'avais fait /auth/qr et /account/qr mais je me souviens même plus 🤣

C'est bien l'autre qu'on utilise depuis le front

@RemiF1908
Copy link
Copy Markdown
Contributor

Les commits ne respectent pas la norme conventional commit, y'a moyen de juste rebase pour renomer ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants