Hi everyone! I've have just a (maybe noob) questio...
# ktor
s
Hi everyone! I've have just a (maybe noob) question. I'm implementing Oauth2 by using this guide -> https://ktor.io/quickstart/guides/oauth.html and looks like everything is working fine, I can see the token but... the question is, how can I indicate that requests need the auth? Right now my config is something like this:
Copy code
routing {
        authenticate(OauthConfig.NAME) {
            route("/test") {
                get { call.respond("Sample from auth part...") }
            }
        }
    }
When I call this WS, I set the access token into the auth header (Bearer) with postman but I get 401, if I do the request from browser, I always get a redirection to the login and it generates new token 😞
c
s
I have sessions implemented and looks like they works, but... Should I remove the "authenticate" block on the requests??
Also, I don't know how to manage token expiration with that... I'll take a look