fix: other auth recipes for oidc idp + remove logs

This commit is contained in:
Lakhan Samani
2022-11-15 21:45:08 +05:30
parent 579899c397
commit 75a547cfe2
12 changed files with 248 additions and 117 deletions

View File

@@ -2278,6 +2278,10 @@ input VerifyEmailInput {
input ResendVerifyEmailInput {
email: String!
identifier: String!
# state is used for authorization code grant flow
# it is used to get code for an on-going auth process during login
# and use that code for setting ` + "`" + `c_hash` + "`" + ` in id_token
state: String
}
input UpdateProfileInput {
@@ -2425,10 +2429,18 @@ input DeleteEmailTemplateRequest {
input VerifyOTPRequest {
email: String!
otp: String!
# state is used for authorization code grant flow
# it is used to get code for an on-going auth process during login
# and use that code for setting ` + "`" + `c_hash` + "`" + ` in id_token
state: String
}
input ResendOTPRequest {
email: String!
# state is used for authorization code grant flow
# it is used to get code for an on-going auth process during login
# and use that code for setting ` + "`" + `c_hash` + "`" + ` in id_token
state: String
}
type Mutation {
@@ -14679,7 +14691,7 @@ func (ec *executionContext) unmarshalInputResendOTPRequest(ctx context.Context,
asMap[k] = v
}
fieldsInOrder := [...]string{"email"}
fieldsInOrder := [...]string{"email", "state"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -14694,6 +14706,14 @@ func (ec *executionContext) unmarshalInputResendOTPRequest(ctx context.Context,
if err != nil {
return it, err
}
case "state":
var err error
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("state"))
it.State, err = ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
}
}
@@ -14707,7 +14727,7 @@ func (ec *executionContext) unmarshalInputResendVerifyEmailInput(ctx context.Con
asMap[k] = v
}
fieldsInOrder := [...]string{"email", "identifier"}
fieldsInOrder := [...]string{"email", "identifier", "state"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -14730,6 +14750,14 @@ func (ec *executionContext) unmarshalInputResendVerifyEmailInput(ctx context.Con
if err != nil {
return it, err
}
case "state":
var err error
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("state"))
it.State, err = ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
}
}
@@ -15879,7 +15907,7 @@ func (ec *executionContext) unmarshalInputVerifyOTPRequest(ctx context.Context,
asMap[k] = v
}
fieldsInOrder := [...]string{"email", "otp"}
fieldsInOrder := [...]string{"email", "otp", "state"}
for _, k := range fieldsInOrder {
v, ok := asMap[k]
if !ok {
@@ -15902,6 +15930,14 @@ func (ec *executionContext) unmarshalInputVerifyOTPRequest(ctx context.Context,
if err != nil {
return it, err
}
case "state":
var err error
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("state"))
it.State, err = ec.unmarshalOString2ᚖstring(ctx, v)
if err != nil {
return it, err
}
}
}

View File

@@ -200,12 +200,14 @@ type PaginationInput struct {
}
type ResendOTPRequest struct {
Email string `json:"email"`
Email string `json:"email"`
State *string `json:"state"`
}
type ResendVerifyEmailInput struct {
Email string `json:"email"`
Identifier string `json:"identifier"`
Email string `json:"email"`
Identifier string `json:"identifier"`
State *string `json:"state"`
}
type ResetPasswordInput struct {
@@ -415,8 +417,9 @@ type VerifyEmailInput struct {
}
type VerifyOTPRequest struct {
Email string `json:"email"`
Otp string `json:"otp"`
Email string `json:"email"`
Otp string `json:"otp"`
State *string `json:"state"`
}
type Webhook struct {