Title: endpoints.get_current_user() "Unable to get authorized scopes" with firebase auth · Issue #161 · cloudendpoints/endpoints-python · GitHub
Open Graph Title: endpoints.get_current_user() "Unable to get authorized scopes" with firebase auth · Issue #161 · cloudendpoints/endpoints-python
X Title: endpoints.get_current_user() "Unable to get authorized scopes" with firebase auth · Issue #161 · cloudendpoints/endpoints-python
Description: I'm getting an error when calling endpoints.get_current_user() with firebase auth. Simple example below: audiences = { 'firebase': [firebase_id] } issuers = { 'firebase': endpoints.Issuer( 'https://securetoken.google.com/{}'.format(fireb...
Open Graph Description: I'm getting an error when calling endpoints.get_current_user() with firebase auth. Simple example below: audiences = { 'firebase': [firebase_id] } issuers = { 'firebase': endpoints.Issuer( 'https:/...
X Description: I'm getting an error when calling endpoints.get_current_user() with firebase auth. Simple example below: audiences = { 'firebase': [firebase_id] } issuers = { 'firebase': endpoi...
Opengraph URL: https://github.com/cloudendpoints/endpoints-python/issues/161
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"endpoints.get_current_user() \"Unable to get authorized scopes\" with firebase auth","articleBody":"I'm getting an error when calling `endpoints.get_current_user()` with firebase auth. Simple example below:\r\n\r\n```\r\naudiences = {\r\n 'firebase': [firebase_id]\r\n}\r\n\r\nissuers = {\r\n 'firebase': endpoints.Issuer(\r\n 'https://securetoken.google.com/{}'.format(firebase_id),\r\n 'https://www.googleapis.com/service_accounts/v1/metadata/x509/securetoken@system.gserviceaccount.com'\r\n )\r\n}\r\n\r\nscopes = [\r\n 'https://www.googleapis.com/auth/userinfo'\r\n]\r\n\r\nallowed_client_ids = [\"firebase_auth\"]\r\n\r\ncollection = endpoints.api(name=api_name, version=api_version, scopes=scopes, base_path=api_path, issuers=issuers, audiences=audiences, allowed_client_ids=allowed_client_ids)\r\n\r\n```\r\n\r\n\r\n```\r\n @endpoints.method(UserTestRequestContainer, UserMessage, name='user.test', path='user/test', http_method='GET')\r\n def test(self, request):\r\n user = endpoints.get_current_user()\r\n logging.info(user)\r\n logging.info('scopes: {}'.format(scopes))\r\n if user is None:\r\n raise endpoints.NotFoundException(\"user not found\")\r\n return UserMessage()\r\n```\r\n\r\n\r\nIn the request log, it shows this:\r\n```\r\n2018-07-06 16:41:59.926 EDT\r\nUnable to get authorized scopes. (/base/data/home/apps/s~tvi-www/20180706t164046.410950432919376241/lib/endpoints/users_id_token.py:371)\r\nTraceback (most recent call last):\r\n File \"/base/data/home/apps/s~tvi-www/20180706t164046.410950432919376241/lib/endpoints/users_id_token.py\", line 369, in _set_bearer_user_vars\r\n authorized_scopes = oauth.get_authorized_scopes(sorted(all_scopes))\r\n File \"/base/alloc/tmpfs/dynamic_runtimes/python27/b93f87cfaa0115e5_unzipped/python27_lib/versions/1/google/appengine/api/oauth/oauth_api.py\", line 171, in get_authorized_scopes\r\n _maybe_call_get_oauth_user(scope)\r\n File \"/base/alloc/tmpfs/dynamic_runtimes/python27/b93f87cfaa0115e5_unzipped/python27_lib/versions/1/google/appengine/api/oauth/oauth_api.py\", line 220, in _maybe_call_get_oauth_user\r\n _maybe_raise_exception()\r\n File \"/base/alloc/tmpfs/dynamic_runtimes/python27/b93f87cfaa0115e5_unzipped/python27_lib/versions/1/google/appengine/api/oauth/oauth_api.py\", line 239, in _maybe_raise_exception\r\n raise InvalidOAuthTokenError(error_detail)\r\nInvalidOAuthTokenError\r\n```","author":{"url":"https://github.com/normmcgarry","@type":"Person","name":"normmcgarry"},"datePublished":"2018-07-06T20:50:14.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/161/endpoints-python/issues/161"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:9940daee-b65f-6bca-74ac-0ca16a8f758e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B584:2EB4CD:C5482D:1162B08:6A4E8A34 |
| html-safe-nonce | 8e1141cc9e6d4fbefad7d64711dd060805762f45ab13082fd47fe9994df0c7db |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTg0OjJFQjRDRDpDNTQ4MkQ6MTE2MkIwODo2QTRFOEEzNCIsInZpc2l0b3JfaWQiOiI2OTAwNTAzMDQ4OTE4ODI5NjIwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 64b67641804ff868dc5bcaa3e641fd37b30e3e259bcef0e6f991248d5f19b072 |
| hovercard-subject-tag | issue:339067759 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cloudendpoints/endpoints-python/161/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f287ccc4d9677898e008b8447989644a721f822a14daccc4138ea8fe2ca02221/cloudendpoints/endpoints-python/issues/161 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f287ccc4d9677898e008b8447989644a721f822a14daccc4138ea8fe2ca02221/cloudendpoints/endpoints-python/issues/161 |
| og:image:alt | I'm getting an error when calling endpoints.get_current_user() with firebase auth. Simple example below: audiences = { 'firebase': [firebase_id] } issuers = { 'firebase': endpoints.Issuer( 'https:/... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | normmcgarry |
| hostname | github.com |
| expected-hostname | github.com |
| None | 41b6ab3ba6d20a71766ac245b5a4a94c6fc672a9cd4da7d44c1b33ab8bf6a21c |
| turbo-cache-control | no-preview |
| go-import | github.com/cloudendpoints/endpoints-python git https://github.com/cloudendpoints/endpoints-python.git |
| octolytics-dimension-user_id | 19231370 |
| octolytics-dimension-user_login | cloudendpoints |
| octolytics-dimension-repository_id | 65349604 |
| octolytics-dimension-repository_nwo | cloudendpoints/endpoints-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 65349604 |
| octolytics-dimension-repository_network_root_nwo | cloudendpoints/endpoints-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | e6a744804e8e70f97b4d5a18a94dcc63db22f97a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width