Hey, I am trying to create a OAuth for GitHub with...
# ktor
m
Hey, I am trying to create a OAuth for GitHub with Ktor, using Location and I have encountered a small issue, when I authenticate the login it'll work perfectly fine, however when I click cancel it'll just refresh the authentication page (instead of going back to the website). As my call back on GitHub I have
localhost:8080/login/github
, in my Ktor I have (following the example from the docs):
Copy code
location<Login>() {
 
    // This never triggers when clicking on cancel
    param("error") {
        println("error occurred")
        call.respondRedirect("/")
    }
 
    handle {
       // Etc, success works fine
    }
I assume either I am not doing the call back correctly or maybe it won't work for localhost? But the
param("error")
is never really called.