Move refresh logic to a separate service

Signed-off-by: Nikolai Rodionov <iam@allanger.xyz>
This commit is contained in:
2026-05-27 12:47:48 +02:00
parent 0f8ccde25c
commit e9f67fb7b0

View File

@@ -17,11 +17,15 @@ service PublicAccountsService {
service AccountsService {
// Is email for the current account verified
rpc IsEmailVerified (IsEmailVerifiedRequest) returns (IsEmailVerifiedResponse) {}
rpc RefreshSession (google.protobuf.Empty) returns (google.protobuf.Empty) {}
// Authorize using long living tokens
rpc TokenAuthorization (google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
// Use as a separate service to make it easier to avoid interceptors on the client
service RefreshSessionService {
rpc RefreshSession(RefreshSessionRequest) returns (RefreshSessionResponse) {}
}
message AccountPassword {
string password = 1;
}
@@ -68,3 +72,16 @@ message IsEmailVerifiedResponse {
message RefreshTokenRequest {
string session_id = 1;
}
message TokenPair {
string access_token = 1;
string refresh_token = 2;
}
message RefreshSessionRequest {
string refresh_token = 1;
}
message RefreshSessionResponse {
TokenPair token_pair = 1;
}