|
| 1 | +// Copyright 2023 Google LLC |
| 2 | +// |
| 3 | +// Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +// you may not use this file except in compliance with the License. |
| 5 | +// You may obtain a copy of the License at |
| 6 | +// |
| 7 | +// http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +// |
| 9 | +// Unless required by applicable law or agreed to in writing, software |
| 10 | +// distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +// See the License for the specific language governing permissions and |
| 13 | +// limitations under the License. |
| 14 | + |
| 15 | +syntax = "proto3"; |
| 16 | + |
| 17 | +package google.events.firebase.auth.v2; |
| 18 | + |
| 19 | +import "google/protobuf/struct.proto"; |
| 20 | +import "google/protobuf/timestamp.proto"; |
| 21 | + |
| 22 | +option csharp_namespace = "Google.Events.Protobuf.Firebase.Auth.V2"; |
| 23 | +option php_namespace = "Google\\Events\\Firebase\\Auth\\V2"; |
| 24 | +option ruby_package = "Google::Events::Firebase::Auth::V2"; |
| 25 | + |
| 26 | +// The data within all Firebase Auth events. |
| 27 | +message AuthEventData { |
| 28 | + // This is not populated for delete events. |
| 29 | + User value = 1; |
| 30 | + |
| 31 | + // This is only populated for update and delete events. |
| 32 | + User old_value = 2; |
| 33 | +} |
| 34 | + |
| 35 | +// The user for this Firebase Auth event. |
| 36 | +message User { |
| 37 | + // The user identifier in the Firebase app. |
| 38 | + string uid = 1; |
| 39 | + |
| 40 | + // The user's primary email, if set. |
| 41 | + string email = 2; |
| 42 | + |
| 43 | + // Whether or not the user's primary email is verified. |
| 44 | + bool email_verified = 3; |
| 45 | + |
| 46 | + // The user's display name. |
| 47 | + string display_name = 4; |
| 48 | + |
| 49 | + // The user's photo URL. |
| 50 | + string photo_url = 5 [json_name = "photoURL"]; |
| 51 | + |
| 52 | + // Whether the user is disabled. |
| 53 | + bool disabled = 6; |
| 54 | + |
| 55 | + // Additional metadata about the user. |
| 56 | + UserMetadata metadata = 7; |
| 57 | + |
| 58 | + // User's info at the providers |
| 59 | + repeated UserInfo provider_data = 8; |
| 60 | + |
| 61 | + // The user's phone number. |
| 62 | + string phone_number = 9; |
| 63 | + |
| 64 | + // User's custom claims, typically used to define user roles and propagated |
| 65 | + // to an authenticated user's ID token. |
| 66 | + google.protobuf.Struct custom_claims = 10; |
| 67 | +} |
| 68 | + |
| 69 | +// Additional metadata about the user. |
| 70 | +message UserMetadata { |
| 71 | + // The date the user was created. |
| 72 | + google.protobuf.Timestamp create_time = 1; |
| 73 | + |
| 74 | + // The date the user last signed in. |
| 75 | + google.protobuf.Timestamp last_sign_in_time = 2; |
| 76 | +} |
| 77 | + |
| 78 | +// User's info at the identity provider |
| 79 | +message UserInfo { |
| 80 | + // The user identifier for the linked provider. |
| 81 | + string uid = 1; |
| 82 | + |
| 83 | + // The email for the linked provider. |
| 84 | + string email = 2; |
| 85 | + |
| 86 | + // The display name for the linked provider. |
| 87 | + string display_name = 3; |
| 88 | + |
| 89 | + // The photo URL for the linked provider. |
| 90 | + string photo_url = 4 [json_name = "photoURL"]; |
| 91 | + |
| 92 | + // The linked provider ID (e.g. "google.com" for the Google provider). |
| 93 | + string provider_id = 5; |
| 94 | +} |
0 commit comments