feat google oauth
This commit is contained in:
@@ -43,3 +43,31 @@ type EmailLoginResponse struct {
|
||||
Token string `json:"token"`
|
||||
ExpiresAt int64 `json:"expires_at"`
|
||||
}
|
||||
|
||||
type GoogleAuthUrlRequest struct {
|
||||
RedirectURI string `form:"redirect_uri" binding:"required"`
|
||||
State string `form:"state" binding:"required"`
|
||||
}
|
||||
|
||||
type GoogleAuthUrlResponse struct {
|
||||
AuthURL string `json:"auth_url"`
|
||||
}
|
||||
|
||||
type GoogleOAuthCallbackRequest struct {
|
||||
Code string `json:"code" binding:"required"`
|
||||
State string `json:"state" binding:"required"`
|
||||
RedirectURI string `json:"redirect_uri" binding:"required"`
|
||||
}
|
||||
|
||||
type GoogleOAuthCallbackResponse struct {
|
||||
Token string `json:"token"`
|
||||
ExpiresAt int64 `json:"expires_at"`
|
||||
}
|
||||
|
||||
type GoogleUserInfo struct {
|
||||
ID string `json:"id"`
|
||||
Email string `json:"email"`
|
||||
Name string `json:"name"`
|
||||
Picture string `json:"picture"`
|
||||
VerifiedEmail bool `json:"verified_email"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user