Fix incorrect login redirect (#64)

This commit is contained in:
Alex Ling
2020-06-09 14:46:45 +00:00
parent a0e5a03052
commit 5cd6f3eacb
3 changed files with 10 additions and 4 deletions
+4 -1
View File
@@ -63,7 +63,10 @@ class AuthHandler < Kemal::Handler
end
def handle_auth(env)
return call_next(env) if request_path_startswith env, ["/login", "/logout"]
if request_path_startswith env, ["/login", "/logout"] ||
requesting_static_file env
return call_next(env)
end
unless validate_token env
env.session.string "callback", env.request.path