You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We actively use Firebase Auth in a new project.
Some tools and services are written in Go.
We want to migrate existing users to Firebase.
So we use Firebase Auth's Import Users feature.
Almost all works well, but it is hard to test some cases because some info is missing in the docs.
That is why being looking through the Firebase Auth docs for other programming languages (https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userproviderrequest.md#properties)
we figured out that a phoneNumber field is missing in the auth.UserProvider struct in Go version of the sdk.
The UserProvider struct should have all the fields that Node.js version has:
typeUserProviderstruct {
UIDstring`json:"rawId"`ProviderIDstring`json:"providerId"`Emailstring`json:"email,omitempty"`PhoneNumberstring`json:"phoneNumber,omitempty"`// missing field in current versionDisplayNamestring`json:"displayName,omitempty"`PhotoURLstring`json:"photoUrl,omitempty"`
}
Environment
A problem
We actively use Firebase Auth in a new project.
Some tools and services are written in Go.
We want to migrate existing users to Firebase.
So we use Firebase Auth's Import Users feature.
Almost all works well, but it is hard to test some cases because some info is missing in the docs.
That is why being looking through the Firebase Auth docs for other programming languages (https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userproviderrequest.md#properties)
we figured out that a
phoneNumber
field is missing in theauth.UserProvider
struct in Go version of the sdk.Reproduce
Just take a look at Node.js' docs https://firebase.google.com/docs/reference/admin/node/firebase-admin.auth.userproviderrequest.md#properties
and at source codes of Go version
firebase-admin-go/auth/import_users.go
Line 195 in 1d24577
Relevant Code
The
UserProvider
struct should have all the fields that Node.js version has:A use case:
A main idea is the same fields should be used across all the implementations of the Firebase Admin API.
The text was updated successfully, but these errors were encountered: