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:9f81d92f-da12-db37-abb1-073890a27f11 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8EAC:BC7D3:F829D:14947A:6A61431D |
| html-safe-nonce | b3fca607fba71199bf60ea1eef3af45c3f58326f1b5f7417c6c8838defe47b99 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RUFDOkJDN0QzOkY4MjlEOjE0OTQ3QTo2QTYxNDMxRCIsInZpc2l0b3JfaWQiOiI4OTIxMDM4MjkxMjYyODQ5ODIxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | ea45dc4bb07c66621ee6f467cc2d9cc07e7d27da08cda0d960c4bb4f385eca57 |
| 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 | 358090e896abe1815bef70fcaae0a12d8ebf315874207428312daf7419e9c7c9 |
| 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 | 87be91c8b3c813d60ac5c8ece422529a03a7e332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width