Skip to content

Commit

Permalink
feat: auth gg login
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpanda committed Jun 24, 2024
1 parent 8024d30 commit 7c47dc3
Showing 1 changed file with 13 additions and 51 deletions.
64 changes: 13 additions & 51 deletions rpkm67/auth/auth/v1/auth.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ option go_package = "rpkm67/auth/auth/v1";
service AuthService {
rpc Validate(ValidateRequest) returns (ValidateResponse) {}
rpc RefreshToken(RefreshTokenRequest) returns (RefreshTokenResponse) {}
rpc SignUp(SignUpRequest) returns (SignUpResponse) {}
rpc SignIn(SignInRequest) returns (SignInResponse) {}
rpc SignOut(SignOutRequest) returns (SignOutResponse) {}
rpc ForgotPassword(ForgotPasswordRequest) returns (ForgotPasswordResponse) {}
rpc ResetPassword(ResetPasswordRequest) returns (ResetPasswordResponse) {}
rpc GetGoogleLoginUrl(GetGoogleLoginUrlRequest) returns (GetGoogleLoginUrlResponse) {}
rpc VerifyGoogleLogin(VerifyGoogleLoginRequest) returns (VerifyGoogleLoginResponse) {}
}

message Credential{
Expand All @@ -30,7 +27,7 @@ message ValidateResponse{
string role = 2;
}

// Redeem Refresh Token
// RefreshToken
message RefreshTokenRequest{
string refreshToken = 1;
}
Expand All @@ -39,55 +36,20 @@ message RefreshTokenResponse{
Credential credential = 1;
}

// SignUp
message SignUpRequest {
string email = 1;
string password = 2;
string firstname = 3;
string lastname = 4;
// GetGoogleLoginUrl
message GetGoogleLoginUrlRequest {
string redirectUrl = 1;
}

message SignUpResponse {
string id = 1;
string email = 2;
string firstname = 3;
string lastname = 4;
}

// SignIn
message SignInRequest {
string email = 1;
string password = 2;
}

message SignInResponse {
Credential credential = 1;
}

// Sign out
message SignOutRequest {
string token = 1;
}

message SignOutResponse {
bool isSuccess = 1;
}

// Forgot password
message ForgotPasswordRequest {
string email = 1;
}

message ForgotPasswordResponse {
message GetGoogleLoginUrlResponse {
string url = 1;
}

// Reset password
message ResetPasswordRequest {
string token = 1;
string password = 2;
// VerifyGoogleLogin
message VerifyGoogleLoginRequest {
string code = 1;
}

message ResetPasswordResponse {
bool isSuccess = 1;
}
message VerifyGoogleLoginResponse {
Credential credential = 1;
}

0 comments on commit 7c47dc3

Please sign in to comment.