hi, what version do you use?
# ktor
r
hi, what version do you use?
h
1.6.8, okay, then I try to create a reproducer
I think, I found my mistake:
Copy code
authenticate("admin") {
    get {
        val user = call.principal<UserIdPrincipal>()!!
        call.respondText { user.name }
    }
}
authenticate("users") {
    get {
        val user = call.principal<UserIdPrincipal>()!!
        call.respondText { user.name }
    }
}
I need to put both providers into one
authenticate
builder...
Copy code
authenticate("admin", "users") {
    get {
        val user = call.principal<UserIdPrincipal>()!!
        call.respondText { user.name }
    }
}
r
yes, that’s true. in the first example there are different subroutes that doesn’t merge
I was very surprised with your message, because we have a test for multiple auth providers
h
Hm, okay, so I have to check the role/users permissions 😄 With the first example, I could simple call a different action, because I know, the user is an admin.
So what about adding a check/warning when two routes are equal (except auth), but could not be merged?