feat: implement sign in with idp

This commit is contained in:
Steven
2024-08-06 22:15:28 +08:00
parent 6db8611a58
commit 647726fc2d
15 changed files with 302 additions and 197 deletions

View File

@ -184,7 +184,7 @@ type SignInWithSSORequest struct {
unknownFields protoimpl.UnknownFields
// The name of the SSO provider.
IdpName int32 `protobuf:"varint,1,opt,name=idp_name,json=idpName,proto3" json:"idp_name,omitempty"`
IdpName string `protobuf:"bytes,1,opt,name=idp_name,json=idpName,proto3" json:"idp_name,omitempty"`
// The code to sign in with.
Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"`
// The redirect URI.
@ -223,11 +223,11 @@ func (*SignInWithSSORequest) Descriptor() ([]byte, []int) {
return file_api_v1_auth_service_proto_rawDescGZIP(), []int{3}
}
func (x *SignInWithSSORequest) GetIdpName() int32 {
func (x *SignInWithSSORequest) GetIdpName() string {
if x != nil {
return x.IdpName
}
return 0
return ""
}
func (x *SignInWithSSORequest) GetCode() string {
@ -307,7 +307,7 @@ var file_api_v1_auth_service_proto_rawDesc = []byte{
0x08, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x22, 0x68, 0x0a, 0x14, 0x53, 0x69, 0x67,
0x6e, 0x49, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x53, 0x53, 0x4f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
0x74, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x64, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
0x01, 0x28, 0x05, 0x52, 0x07, 0x69, 0x64, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x64, 0x70, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65,
0x12, 0x21, 0x0a, 0x0c, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x5f, 0x75, 0x72, 0x69,
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74,