feat(webui): add a member by provider subject or email

POST /api/orgs/{id}/members binds a person by subject, or by email as a
placeholder. The first sign-in whose provider vouches for that email
claims it: the State Store moves the binding onto the provider's subject
in one statement, so a second account with the same address finds
nothing to claim and later sign-ins rest on the subject alone.
This commit is contained in:
sam committed 2026-10-11 03:54:49 +11:00
1 parent 9e1a40ce99
commit 37cbf2ef47
17 files changed
+2085 -1505

No files matched your search

+7
View File
@@ -52,6 +52,7 @@ service StateStoreService {
// identity store.
rpc ResolveIdentitySubject(ResolveIdentitySubjectRequest) returns (ResolveIdentitySubjectResponse);
rpc BindIdentitySubject(BindIdentitySubjectRequest) returns (BindIdentitySubjectResponse);
rpc ClaimIdentitySubject(ClaimIdentitySubjectRequest) returns (ClaimIdentitySubjectResponse);
// Personal API tokens act on the caller's own principal: the State Store
// refuses a call that carries none.
rpc AddPersonalToken(AddPersonalTokenRequest) returns (AddPersonalTokenResponse);
@@ -337,6 +338,12 @@ message BindIdentitySubjectRequest {
IdentityAudit audit = 4;
}
message BindIdentitySubjectResponse { Identity identity = 1; }
message ClaimIdentitySubjectRequest {
string issuer = 1;
string placeholder = 2;
string subject = 3;
}
message ClaimIdentitySubjectResponse { Identity identity = 1; }
// PersonalToken identifies a token by the SHA-256 it binds as; the token
// itself never reaches the State Store.