goauthentik / goauthentik/authentik

SSR for the web frontend (where possible)

Open
#13,762 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
25.6k
Forks
2k
Avg merge
1d 1h
Merged PRs (30d)
644

Description

This feature request is a bit of a far shot since it's definitely harder to implement. But I didn't find any issues regarding it, open or closed, so I thought I'd give it a shot.

---

**Is your feature request related to a problem? Please describe.**

When testing out authentik on our infra, one of our members got frustrated with the following behaviour:

They saw a loading bar for a few seconds, the frontend doing 51 requests, and loading 2MB of JavaScript to, in the end, show them a single input field for the login.

Which is, to be fair, a little excessive for displaying the login form.

**Describe the solution you'd like**

Most modern web frameworks support the following setup:

- Initial render of the website is done on the server-side and sent as HTML to the client
- Client shows the HTML without having to execute JavaScript
- Upon interacting with an element, or having finished loading the full page, the frontend attempts dynamic rehydration through loading and executing JavaScript when necessary

This setup would be ideal for things like the login form, where there's not a lot of moving parts anyway.

**Describe alternatives you've considered**

Maybe some of the issues could be mitigated by setting up more granular chunking?
Loading 2MB seems like weird chunking behaviour.

Experimenting around with chunking might be easier to do than to add SSR.

**Additional context**

Just reporting 1:1 the stats they sent to us over our Ops channel, can request additional stats when needed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.