Я следил за руководством по документации Vertx для потока кода. < /p>
Каким -то образом в Конец я получаю эту ошибку, и я не могу понять, что не так. Я дважды проверил и пробовал несколько вещей без обязательств.
Код: Выделить всё
invalid_grant: Incorrect redirect_uri
< /code>
JsonObject config= new JsonObject();
tokenConfig.put("code", authCodeFromProvider);
tokenConfig.put("redirect_uri", redirectionUri);
oauth2.authenticate(tokenConfig).onSuccess(
reponse-> {
//CODE FOR Succesful Repsonse is here IS HERE
}
).onFailure(err -> {
//CODE FOR LOG IS HERE
});
< /code>
Пример из Vertx Doc. < /p>
// Redirect example using Vert.x
response.putHeader("Location", authorization_uri)
.setStatusCode(302)
.end();
JsonObject tokenConfig = new JsonObject()
.put("code", "")
.put("redirectUri", "http://localhost:3000/callback");
// Callbacks
// Save the access token
oauth2.authenticate(tokenConfig)
.onSuccess(user -> {
// Get the access token object
// (the authorization code is given from the previous step).
})
.onFailure(err -> {
System.err.println("Access Token Error: " + err.getMessage());
});
Подробнее здесь: https://stackoverflow.com/questions/793 ... direct-uri
Мобильная версия