Closed rishavs closed 7 years ago
Sorry for later response.
Could you please trace and submit here raw_json
before line 79 at providers/google.cr
{
"error": {
"code": 403,
"message": "Google People API has not been used in project kamel-dev before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/people.googleapis.com/overview?project=kamel-dev then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status": "PERMISSION_DENIED",
"details": [
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Google developers console API activation",
"url": "https://console.developers.google.com/apis/api/people.googleapis.com/overview?project=kamel-dev"
}
]
}
]
}
}
I think in case of errors, it will be prudent to show the error message.
EDIT: anfter enabling the api, i am now getting;
invalid_grant: Invalid code. (OAuth2::Error)
0x5597fcf9e43a: get_access_token_using_authorization_code at /opt/crystal/src/oauth2/client.cr 152:7
0x5597fcfa00ab: user at /home/rick/DevSpace/Crystal/Kamel/lib/multi_auth/src/multi_auth/providers/google.cr 33:20
0x5597fcf9cdac: user at /home/rick/DevSpace/Crystal/Kamel/lib/multi_auth/src/multi_auth/engine.cr 23:5
0x5597fce69c6c: ~procProc(HTTP::Server::Context, (String | Nil)) at /home/rick/DevSpace/Crystal/Kamel/lib/kemal/src/kemal/dsl.cr 10:1
0x5597fce6bb1c: ~proc4Proc(HTTP::Server::Context, String) at /home/rick/DevSpace/Crystal/Kamel/lib/kemal/src/kemal/dsl.cr 10:1
0x5597fcf8526d: process_request at /home/rick/DevSpace/Crystal/Kamel/lib/kemal/src/kemal/route_handler.cr 255:3
0x5597fcf85096: call at /home/rick/DevSpace/Crystal/Kamel/lib/kemal/src/kemal/route_handler.cr 18:7
0x5597fcfe7e96: call_next at /opt/crystal/src/http/server/handler.cr 24:7
0x5597fcfe7869: call at /home/rick/DevSpace/Crystal/Kamel/lib/kemal/src/kemal/static_file_handler.cr 56:9
0x5597fcfe697d: call_next at /opt/crystal/src/http/server/handler.cr 24:7
0x5597fcfe6460: call at /home/rick/DevSpace/Crystal/Kamel/lib/kemal/src/kemal/common_exception_handler.cr 9:9
0x5597fcfe5a03: call_next at /opt/crystal/src/http/server/handler.cr 24:7
0x5597fcfe2611: call at /home/rick/DevSpace/Crystal/Kamel/lib/kemal/src/kemal/common_log_handler.cr 13:35
0x5597fcf840e8: call_next at /opt/crystal/src/http/server/handler.cr 24:7
0x5597fcf83ccf: call at /home/rick/DevSpace/Crystal/Kamel/lib/kemal/src/kemal/init_handler.cr 11:7
0x5597fcfef81b: process at /opt/crystal/src/http/server/request_processor.cr 39:11
0x5597fcfef129: process at /opt/crystal/src/http/server/request_processor.cr 16:3
0x5597fcfe95f0: handle_client at /opt/crystal/src/http/server.cr 191:5
0x5597fce6d293: ~procProc(Nil) at /home/rick/DevSpace/Crystal/Kamel/lib/kemal/src/kemal/dsl.cr 10:1
0x5597fce895ce: run at /opt/crystal/src/fiber.cr 255:3
0x5597fce648a6: ~proc2Proc(Fiber, (IO::FileDescriptor | Nil)) at /opt/crystal/src/concurrent.cr 61:3
0x0: ??? at ??
Google error handler added.
invalid_grant: Invalid code. (OAuth2::Error)
I setup new google app, after enabling People API it works.
Look like you need fresh code
, so do redirect first multi_auth.authorize_uri
to get new code
Hi
I tried the example given in the github page. I used it for a google auth process.
However when the redirect_uri is called, i get the following error;