fix: add token information in redirect url
This commit is contained in:
@@ -173,13 +173,15 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
VerificationRequest struct {
|
||||
CreatedAt func(childComplexity int) int
|
||||
Email func(childComplexity int) int
|
||||
Expires func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Identifier func(childComplexity int) int
|
||||
Token func(childComplexity int) int
|
||||
UpdatedAt func(childComplexity int) int
|
||||
CreatedAt func(childComplexity int) int
|
||||
Email func(childComplexity int) int
|
||||
Expires func(childComplexity int) int
|
||||
ID func(childComplexity int) int
|
||||
Identifier func(childComplexity int) int
|
||||
Nonce func(childComplexity int) int
|
||||
RedirectURI func(childComplexity int) int
|
||||
Token func(childComplexity int) int
|
||||
UpdatedAt func(childComplexity int) int
|
||||
}
|
||||
|
||||
VerificationRequests struct {
|
||||
@@ -1038,6 +1040,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.VerificationRequest.Identifier(childComplexity), true
|
||||
|
||||
case "VerificationRequest.nonce":
|
||||
if e.complexity.VerificationRequest.Nonce == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.VerificationRequest.Nonce(childComplexity), true
|
||||
|
||||
case "VerificationRequest.redirect_uri":
|
||||
if e.complexity.VerificationRequest.RedirectURI == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.VerificationRequest.RedirectURI(childComplexity), true
|
||||
|
||||
case "VerificationRequest.token":
|
||||
if e.complexity.VerificationRequest.Token == nil {
|
||||
break
|
||||
@@ -1189,6 +1205,8 @@ type VerificationRequest {
|
||||
expires: Int64
|
||||
created_at: Int64
|
||||
updated_at: Int64
|
||||
nonce: String
|
||||
redirect_uri: String
|
||||
}
|
||||
|
||||
type VerificationRequests {
|
||||
@@ -1361,6 +1379,8 @@ input UpdateUserInput {
|
||||
|
||||
input ForgotPasswordInput {
|
||||
email: String!
|
||||
state: String
|
||||
redirect_uri: String
|
||||
}
|
||||
|
||||
input ResetPasswordInput {
|
||||
@@ -1377,6 +1397,8 @@ input MagicLinkLoginInput {
|
||||
email: String!
|
||||
roles: [String!]
|
||||
scope: [String!]
|
||||
state: String
|
||||
redirect_uri: String
|
||||
}
|
||||
|
||||
input SessionQueryInput {
|
||||
@@ -5451,6 +5473,70 @@ func (ec *executionContext) _VerificationRequest_updated_at(ctx context.Context,
|
||||
return ec.marshalOInt642ᚖint64(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) _VerificationRequest_nonce(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequest) (ret graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
fc := &graphql.FieldContext{
|
||||
Object: "VerificationRequest",
|
||||
Field: field,
|
||||
Args: nil,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
}
|
||||
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.Nonce, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) _VerificationRequest_redirect_uri(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequest) (ret graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = graphql.Null
|
||||
}
|
||||
}()
|
||||
fc := &graphql.FieldContext{
|
||||
Object: "VerificationRequest",
|
||||
Field: field,
|
||||
Args: nil,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
}
|
||||
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return obj.RedirectURI, nil
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.(*string)
|
||||
fc.Result = res
|
||||
return ec.marshalOString2ᚖstring(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) _VerificationRequests_pagination(ctx context.Context, field graphql.CollectedField, obj *model.VerificationRequests) (ret graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
@@ -6729,6 +6815,22 @@ func (ec *executionContext) unmarshalInputForgotPasswordInput(ctx context.Contex
|
||||
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
|
||||
}
|
||||
case "redirect_uri":
|
||||
var err error
|
||||
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("redirect_uri"))
|
||||
it.RedirectURI, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6815,6 +6917,22 @@ func (ec *executionContext) unmarshalInputMagicLinkLoginInput(ctx context.Contex
|
||||
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
|
||||
}
|
||||
case "redirect_uri":
|
||||
var err error
|
||||
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("redirect_uri"))
|
||||
it.RedirectURI, err = ec.unmarshalOString2ᚖstring(ctx, v)
|
||||
if err != nil {
|
||||
return it, err
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8290,6 +8408,10 @@ func (ec *executionContext) _VerificationRequest(ctx context.Context, sel ast.Se
|
||||
out.Values[i] = ec._VerificationRequest_created_at(ctx, field, obj)
|
||||
case "updated_at":
|
||||
out.Values[i] = ec._VerificationRequest_updated_at(ctx, field, obj)
|
||||
case "nonce":
|
||||
out.Values[i] = ec._VerificationRequest_nonce(ctx, field, obj)
|
||||
case "redirect_uri":
|
||||
out.Values[i] = ec._VerificationRequest_redirect_uri(ctx, field, obj)
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
|
@@ -69,7 +69,9 @@ type Error struct {
|
||||
}
|
||||
|
||||
type ForgotPasswordInput struct {
|
||||
Email string `json:"email"`
|
||||
Email string `json:"email"`
|
||||
State *string `json:"state"`
|
||||
RedirectURI *string `json:"redirect_uri"`
|
||||
}
|
||||
|
||||
type LoginInput struct {
|
||||
@@ -80,9 +82,11 @@ type LoginInput struct {
|
||||
}
|
||||
|
||||
type MagicLinkLoginInput struct {
|
||||
Email string `json:"email"`
|
||||
Roles []string `json:"roles"`
|
||||
Scope []string `json:"scope"`
|
||||
Email string `json:"email"`
|
||||
Roles []string `json:"roles"`
|
||||
Scope []string `json:"scope"`
|
||||
State *string `json:"state"`
|
||||
RedirectURI *string `json:"redirect_uri"`
|
||||
}
|
||||
|
||||
type Meta struct {
|
||||
@@ -239,13 +243,15 @@ type Users struct {
|
||||
}
|
||||
|
||||
type VerificationRequest struct {
|
||||
ID string `json:"id"`
|
||||
Identifier *string `json:"identifier"`
|
||||
Token *string `json:"token"`
|
||||
Email *string `json:"email"`
|
||||
Expires *int64 `json:"expires"`
|
||||
CreatedAt *int64 `json:"created_at"`
|
||||
UpdatedAt *int64 `json:"updated_at"`
|
||||
ID string `json:"id"`
|
||||
Identifier *string `json:"identifier"`
|
||||
Token *string `json:"token"`
|
||||
Email *string `json:"email"`
|
||||
Expires *int64 `json:"expires"`
|
||||
CreatedAt *int64 `json:"created_at"`
|
||||
UpdatedAt *int64 `json:"updated_at"`
|
||||
Nonce *string `json:"nonce"`
|
||||
RedirectURI *string `json:"redirect_uri"`
|
||||
}
|
||||
|
||||
type VerificationRequests struct {
|
||||
|
@@ -57,6 +57,8 @@ type VerificationRequest {
|
||||
expires: Int64
|
||||
created_at: Int64
|
||||
updated_at: Int64
|
||||
nonce: String
|
||||
redirect_uri: String
|
||||
}
|
||||
|
||||
type VerificationRequests {
|
||||
@@ -229,6 +231,8 @@ input UpdateUserInput {
|
||||
|
||||
input ForgotPasswordInput {
|
||||
email: String!
|
||||
state: String
|
||||
redirect_uri: String
|
||||
}
|
||||
|
||||
input ResetPasswordInput {
|
||||
@@ -245,6 +249,8 @@ input MagicLinkLoginInput {
|
||||
email: String!
|
||||
roles: [String!]
|
||||
scope: [String!]
|
||||
state: String
|
||||
redirect_uri: String
|
||||
}
|
||||
|
||||
input SessionQueryInput {
|
||||
|
Reference in New Issue
Block a user