You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello I am glad to see that you are interested in this issue. If you want to know if someone is already connected just call the GetCurrentUser function.
You can take a look at this if you need help : https://www.alexedwards.net/blog/making-and-using-middleware
you just need to call GetCurrentUser(r) (r is the request), if it returns an error redirect to '/login' by using http.Redirect() method.
and that's it.
Why ?
Because people does not want to lose time on making a middleware
To-Do
Create a middleware to redirect the user to as specified page in the config if it is not loggedin.
The text was updated successfully, but these errors were encountered: