Title: Custom Login token handling in auth_backend.ts · Issue #292 · angular/angularfire · GitHub
Open Graph Title: Custom Login token handling in auth_backend.ts · Issue #292 · angular/angularfire
X Title: Custom Login token handling in auth_backend.ts · Issue #292 · angular/angularfire
Description: export function authDataToAuthState(authData: firebase.User, providerData?: OAuthCredential): FirebaseAuthState { if (!authData) return null; let providerId; let { uid } = authData; let authState: FirebaseAuthState = { auth: authData, ui...
Open Graph Description: export function authDataToAuthState(authData: firebase.User, providerData?: OAuthCredential): FirebaseAuthState { if (!authData) return null; let providerId; let { uid } = authData; let authState: ...
X Description: export function authDataToAuthState(authData: firebase.User, providerData?: OAuthCredential): FirebaseAuthState { if (!authData) return null; let providerId; let { uid } = authData; let authState: ...
Opengraph URL: https://github.com/angular/angularfire/issues/292
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Custom Login token handling in auth_backend.ts","articleBody":"```\nexport function authDataToAuthState(authData: firebase.User, providerData?: OAuthCredential): FirebaseAuthState {\n if (!authData) return null;\n let providerId;\n let { uid } = authData;\n let authState: FirebaseAuthState = { auth: authData, uid, provider: null };\n if (authData.isAnonymous) {\n providerId = 'anonymous';\n authState.provider = AuthProviders.Anonymous;\n authState.anonymous = true;\n return authState;\n } else {\n providerId = authData.providerData[0].providerId;\n }\n```\n\nWhen the custom token is submitted to Firebase at one point we end up here. From what I noticed, the authData.providerData is an array of length 0 and hence \n`providerId = authData.providerData[0].providerId;`\n\nresults in undefined error.\n\nI do not know where the fix should be -\n\na) Should Firebase return providerData \u0026 providerId set to \"custom\" as expected by AngularFire2 ?\n\nor\n\nb) Should AngularFire2 determines that authentication used was custom so there will be no providerData ?\n\nRegards\nKapil\n","author":{"url":"https://github.com/ksachdeva","@type":"Person","name":"ksachdeva"},"datePublished":"2016-06-27T12:50:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/292/angularfire/issues/292"}
| 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:0ece8db0-e200-05f3-5f54-e577753b2103 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95CC:1B65C7:268BA3F:37AD9C4:6A60C3EF |
| html-safe-nonce | 9cdc6a00aed93285524a51517e48635756d802bb49a47ac5c04f6728e748715b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUNDOjFCNjVDNzoyNjhCQTNGOjM3QUQ5QzQ6NkE2MEMzRUYiLCJ2aXNpdG9yX2lkIjoiNDYxNDQ0OTM3MjEwNTU4OTc0MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 55318489f4cbdb3c4ad45afc2a677383c78fe707b5a33ef8f3358b8857fdeb42 |
| hovercard-subject-tag | issue:162444223 |
| 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/angular/angularfire/292/issue_layout |
| twitter:image | https://opengraph.githubassets.com/209337e99aecd148b0db84532793726fc1382da20835711cf7e82bc804957d6f/angular/angularfire/issues/292 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/209337e99aecd148b0db84532793726fc1382da20835711cf7e82bc804957d6f/angular/angularfire/issues/292 |
| og:image:alt | export function authDataToAuthState(authData: firebase.User, providerData?: OAuthCredential): FirebaseAuthState { if (!authData) return null; let providerId; let { uid } = authData; let authState: ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ksachdeva |
| hostname | github.com |
| expected-hostname | github.com |
| None | e30aeaafb59b2438b8b0aaa24f4c6777e8e86dae0737625adfc928cac5443cd5 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angularfire git https://github.com/angular/angularfire.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 49453413 |
| octolytics-dimension-repository_nwo | angular/angularfire |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49453413 |
| octolytics-dimension-repository_network_root_nwo | angular/angularfire |
| 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 | 34b43e23ce2dc970fbfce25d0e96500f2af8266d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width