# Login Redirect
It makes sense to redirect users that login to simple-auth (or create an account) back to a webpage once they do so.
By default, simple-auth will show the user the /#/manage
page once logged in.
You have a few things you can do if this is undesirable.
# Default Redirect
One solution is to redirect users to another endpoint once they login, by default.
You can do this with the routeonlogin
setting. This can also be combined
with continue URLs below.
web:
login:
settings:
routeonlogin: http://example.com
TIP
If you do this, make sure to still provide a way for users to manage their account.
You can link directly to /#/manage
elsewhere on your website.
# Continue URLs
Continue URL's allow you to have your application specify where to send the user once they have logged in.
By adding the ?continue=
query param to the login route (/
by default), you
can request that simple-auth send the user to a page post-login.
For security reasons, you must allowlist these URLs ahead of time via the
allowedcontinueurls
setting. This is a list of regular expressions. The regex
is automatically appended/prepended with ^
and $
, respectively.
If the requested continue URL doesn't match anything on the allowed list, the user will be redirected to the default login route.
web:
login:
settings:
allowedcontinueurls:
- https://www.example.com
- https://www.google.com
- etc...