Skip to content

Commit 72a68ce

Browse files
Merge branch 'googleapis:main' into main
2 parents 87d6d84 + d9aa99c commit 72a68ce

File tree

2 files changed

+152
-0
lines changed

2 files changed

+152
-0
lines changed
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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/events/cloudevent.proto";
20+
import "google/events/firebase/auth/v2/data.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+
option (google.events.cloud_event_product) = "Firebase Authentication";
26+
option (google.events.cloud_event_extension_attribute) = {
27+
name: "tenantid"
28+
description: "The tenant ID associated with the user account."
29+
};
30+
31+
// The CloudEvent raised when a Firebase user is created.
32+
message UserCreatedEvent {
33+
option (google.events.cloud_event_type) =
34+
"google.firebase.auth.user.v2.created";
35+
option (google.events.cloud_event_extension_name) = "tenantid";
36+
37+
// The data associated with the event.
38+
AuthEventData data = 1;
39+
}
40+
41+
message UserUpdatedEvent {
42+
option (google.events.cloud_event_type) =
43+
"google.firebase.auth.user.v2.updated";
44+
option (google.events.cloud_event_extension_name) = "tenantid";
45+
46+
// The original data associated with the user.
47+
AuthEventData data = 1;
48+
}
49+
50+
// The CloudEvent raised when a Firebase user is deleted.
51+
message UserDeletedEvent {
52+
option (google.events.cloud_event_type) =
53+
"google.firebase.auth.user.v2.deleted";
54+
option (google.events.cloud_event_extension_name) = "tenantid";
55+
56+
// The data associated with the event.
57+
AuthEventData data = 1;
58+
}

0 commit comments

Comments
 (0)