docs icon indicating copy to clipboard operation
docs copied to clipboard

Prototype silent authentication

Open lebaudantoine opened this issue 6 months ago • 11 comments

This contribution is totally draft, and waiting for peer-programming with @AntoLC . Requested by @virgile-dev, I propose a prototype of the silent login authentication implemented in La Suite Django package.

lebaudantoine avatar May 21 '25 14:05 lebaudantoine

Nice thank you @lebaudantoine ! @AntoLC this is a huge win for users, let's get to it when you or @lunika get a bit of bandwith

virgile-dev avatar May 22 '25 14:05 virgile-dev

current UX (insufficient RAM on my computer are negatively impacting the current UX.)

https://github.com/user-attachments/assets/b7aacc39-e472-4fcb-8c65-830d6548bca1

lebaudantoine avatar May 24 '25 22:05 lebaudantoine

While reducing the number of requests to the /me endpoint, I discovered a race condition. React Query is designed to execute a single /me query, from my understanding, but there's a race condition occurring between the Auth component and the Language Picker component, which triggers two simultaneous requests.

lebaudantoine avatar May 24 '25 22:05 lebaudantoine

We should add a configuration, I propose IS_SILENT_LOGIN_ENABLED. People self-hosting docs could enable the silent login, if their OIDC provider supports the prompt parameter.

lebaudantoine avatar May 24 '25 22:05 lebaudantoine

To avoid spamming the user with too many redirections, in my code, the default retry silent login is every hour.

lebaudantoine avatar May 24 '25 22:05 lebaudantoine

current UX (insufficient RAM on my computer are negatively impacting the current UX.) wip.mov

Hey @lebaudantoine thanks for the video. Ideally if a user is loggued in he should see his documents and not the landing page. Is that something we can acheive with the right callback maybe ?

virgile-dev avatar May 25 '25 07:05 virgile-dev

@virgile-dev I've not modified this behavior, it should be still functional. In the video, I'm logged out. The video illustrates that silent login is tried once per 1hour

lebaudantoine avatar May 25 '25 08:05 lebaudantoine

I close it, I added tags to find it easily again. Feel free to open it if you want to work on it again.

AntoLC avatar Oct 03 '25 13:10 AntoLC

@AntoLC actually that's quite important and @lebaudantoine told be he wanted to finish it.

virgile-dev avatar Oct 03 '25 16:10 virgile-dev

@lunika if you can help on this one it'd be great. it's a big win for users.

virgile-dev avatar Oct 08 '25 08:10 virgile-dev

@lunika I don't think @lebaudantoine has time to finish this could you take it over ?

virgile-dev avatar Nov 14 '25 10:11 virgile-dev