Fix refresh token
This commit is contained in:
parent
e7a0495556
commit
7e11db8c52
4 changed files with 51 additions and 24 deletions
|
@ -62,6 +62,11 @@ enum AccountErrorCode {
|
|||
PASSWORD_TOO_SIMILAR
|
||||
REQUIRED
|
||||
UNIQUE
|
||||
JWT_SIGNATURE_EXPIRED
|
||||
JWT_INVALID_TOKEN
|
||||
JWT_DECODE_ERROR
|
||||
JWT_MISSING_TOKEN
|
||||
JWT_INVALID_CSRF_TOKEN
|
||||
}
|
||||
|
||||
input AccountInput {
|
||||
|
@ -1443,10 +1448,12 @@ type CountryDisplay {
|
|||
}
|
||||
|
||||
type CreateToken {
|
||||
token: String
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
accountErrors: [AccountError!]!
|
||||
token: String
|
||||
refreshToken: String
|
||||
csrfToken: String
|
||||
user: User
|
||||
accountErrors: [AccountError!]!
|
||||
}
|
||||
|
||||
type CreditCard {
|
||||
|
@ -1540,6 +1547,11 @@ input DateTimeRangeInput {
|
|||
lte: DateTime
|
||||
}
|
||||
|
||||
type DeactivateAllUserTokens {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
accountErrors: [AccountError!]!
|
||||
}
|
||||
|
||||
scalar Decimal
|
||||
|
||||
type DeleteMetadata {
|
||||
|
@ -2449,9 +2461,6 @@ type Mutation {
|
|||
voucherCataloguesAdd(id: ID!, input: CatalogueInput!): VoucherAddCatalogues
|
||||
voucherCataloguesRemove(id: ID!, input: CatalogueInput!): VoucherRemoveCatalogues
|
||||
voucherTranslate(id: ID!, input: NameTranslationInput!, languageCode: LanguageCodeEnum!): VoucherTranslate
|
||||
tokenCreate(email: String!, password: String!): CreateToken
|
||||
tokenRefresh(token: String!): RefreshToken
|
||||
tokenVerify(token: String!): VerifyToken
|
||||
checkoutAddPromoCode(checkoutId: ID!, promoCode: String!): CheckoutAddPromoCode
|
||||
checkoutBillingAddressUpdate(billingAddress: AddressInput!, checkoutId: ID!): CheckoutBillingAddressUpdate
|
||||
checkoutComplete(checkoutId: ID!, redirectUrl: String, storeSource: Boolean = false): CheckoutComplete
|
||||
|
@ -2476,9 +2485,13 @@ type Mutation {
|
|||
appTokenCreate(input: AppTokenInput!): AppTokenCreate
|
||||
appTokenDelete(id: ID!): AppTokenDelete
|
||||
appTokenVerify(token: String!): AppTokenVerify
|
||||
tokenCreate(email: String!, password: String!): CreateToken
|
||||
tokenRefresh(csrfToken: String, refreshToken: String): RefreshToken
|
||||
tokenVerify(token: String!): VerifyToken
|
||||
tokensDeactivateAll: DeactivateAllUserTokens
|
||||
requestPasswordReset(email: String!, redirectUrl: String!): RequestPasswordReset
|
||||
confirmAccount(email: String!, token: String!): ConfirmAccount
|
||||
setPassword(token: String!, email: String!, password: String!): SetPassword
|
||||
setPassword(email: String!, password: String!, token: String!): SetPassword
|
||||
passwordChange(newPassword: String!, oldPassword: String!): PasswordChange
|
||||
requestEmailChange(newEmail: String!, password: String!, redirectUrl: String!): RequestEmailChange
|
||||
confirmEmailChange(token: String!): ConfirmEmailChange
|
||||
|
@ -2753,6 +2766,7 @@ enum OrderEventsEnum {
|
|||
ORDER_FULLY_PAID
|
||||
UPDATED_ADDRESS
|
||||
EMAIL_SENT
|
||||
PAYMENT_AUTHORIZED
|
||||
PAYMENT_CAPTURED
|
||||
PAYMENT_REFUNDED
|
||||
PAYMENT_VOIDED
|
||||
|
@ -3105,19 +3119,21 @@ enum PaymentErrorCode {
|
|||
GRAPHQL_ERROR
|
||||
INVALID
|
||||
NOT_FOUND
|
||||
REQUIRED
|
||||
UNIQUE
|
||||
PARTIAL_PAYMENT_NOT_ALLOWED
|
||||
SHIPPING_ADDRESS_NOT_SET
|
||||
INVALID_SHIPPING_METHOD
|
||||
SHIPPING_METHOD_NOT_SET
|
||||
PAYMENT_ERROR
|
||||
REQUIRED
|
||||
UNIQUE
|
||||
NOT_SUPPORTED_GATEWAY
|
||||
}
|
||||
|
||||
type PaymentGateway {
|
||||
name: String!
|
||||
id: ID!
|
||||
config: [GatewayConfigLine!]!
|
||||
currencies: [String]!
|
||||
}
|
||||
|
||||
input PaymentInput {
|
||||
|
@ -3176,8 +3192,8 @@ enum PermissionEnum {
|
|||
|
||||
type PermissionGroupCreate {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
group: Group
|
||||
permissionGroupErrors: [PermissionGroupError!]!
|
||||
group: Group
|
||||
}
|
||||
|
||||
input PermissionGroupCreateInput {
|
||||
|
@ -3226,8 +3242,8 @@ input PermissionGroupSortingInput {
|
|||
|
||||
type PermissionGroupUpdate {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
group: Group
|
||||
permissionGroupErrors: [PermissionGroupError!]!
|
||||
group: Group
|
||||
}
|
||||
|
||||
input PermissionGroupUpdateInput {
|
||||
|
@ -3958,8 +3974,10 @@ type ReducedRate {
|
|||
}
|
||||
|
||||
type RefreshToken {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
token: String
|
||||
payload: GenericScalar
|
||||
user: User
|
||||
accountErrors: [AccountError!]!
|
||||
}
|
||||
|
||||
input ReorderInput {
|
||||
|
@ -4209,10 +4227,12 @@ type ServiceAccountUpdatePrivateMeta {
|
|||
}
|
||||
|
||||
type SetPassword {
|
||||
token: String
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
accountErrors: [AccountError!]!
|
||||
token: String
|
||||
refreshToken: String
|
||||
csrfToken: String
|
||||
user: User
|
||||
accountErrors: [AccountError!]!
|
||||
}
|
||||
|
||||
type ShippingError {
|
||||
|
@ -4336,8 +4356,8 @@ type ShippingZoneCountableEdge {
|
|||
|
||||
type ShippingZoneCreate {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
shippingZone: ShippingZone
|
||||
shippingErrors: [ShippingError!]!
|
||||
shippingZone: ShippingZone
|
||||
}
|
||||
|
||||
input ShippingZoneCreateInput {
|
||||
|
@ -4355,8 +4375,8 @@ type ShippingZoneDelete {
|
|||
|
||||
type ShippingZoneUpdate {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
shippingZone: ShippingZone
|
||||
shippingErrors: [ShippingError!]!
|
||||
shippingZone: ShippingZone
|
||||
}
|
||||
|
||||
input ShippingZoneUpdateInput {
|
||||
|
@ -4368,7 +4388,7 @@ input ShippingZoneUpdateInput {
|
|||
}
|
||||
|
||||
type Shop {
|
||||
availablePaymentGateways: [PaymentGateway!]!
|
||||
availablePaymentGateways(currency: String): [PaymentGateway!]!
|
||||
geolocalization: Geolocalization
|
||||
authorizationKeys: [AuthorizationKey]!
|
||||
countries(languageCode: LanguageCodeEnum): [CountryDisplay!]!
|
||||
|
@ -4904,8 +4924,11 @@ type VariantPricingInfo {
|
|||
}
|
||||
|
||||
type VerifyToken {
|
||||
payload: GenericScalar
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
user: User
|
||||
isValid: Boolean!
|
||||
payload: GenericScalar
|
||||
accountErrors: [AccountError!]!
|
||||
}
|
||||
|
||||
type Voucher implements Node {
|
||||
|
@ -5125,14 +5148,14 @@ input WarehouseFilterInput {
|
|||
|
||||
type WarehouseShippingZoneAssign {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
warehouse: Warehouse
|
||||
warehouseErrors: [WarehouseError!]!
|
||||
warehouse: Warehouse
|
||||
}
|
||||
|
||||
type WarehouseShippingZoneUnassign {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
warehouse: Warehouse
|
||||
warehouseErrors: [WarehouseError!]!
|
||||
warehouse: Warehouse
|
||||
}
|
||||
|
||||
enum WarehouseSortField {
|
||||
|
@ -5198,8 +5221,8 @@ input WebhookCreateInput {
|
|||
|
||||
type WebhookDelete {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
webhook: Webhook
|
||||
webhookErrors: [WebhookError!]!
|
||||
webhook: Webhook
|
||||
}
|
||||
|
||||
type WebhookError {
|
||||
|
@ -5265,8 +5288,8 @@ input WebhookSortingInput {
|
|||
|
||||
type WebhookUpdate {
|
||||
errors: [Error!]! @deprecated(reason: "Use typed errors with error codes. This field will be removed after 2020-07-31.")
|
||||
webhook: Webhook
|
||||
webhookErrors: [WebhookError!]!
|
||||
webhook: Webhook
|
||||
}
|
||||
|
||||
input WebhookUpdateInput {
|
||||
|
|
|
@ -102,9 +102,8 @@ export const SetPasswordMutation = TypedMutation<
|
|||
|
||||
const refreshToken = gql`
|
||||
mutation RefreshToken($token: String!) {
|
||||
tokenRefresh(token: $token) {
|
||||
tokenRefresh(csrfToken: $token) {
|
||||
token
|
||||
payload
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
export interface RefreshToken_tokenRefresh {
|
||||
__typename: "RefreshToken";
|
||||
token: string | null;
|
||||
payload: any | null;
|
||||
}
|
||||
|
||||
export interface RefreshToken {
|
||||
|
|
|
@ -20,6 +20,11 @@ export enum AccountErrorCode {
|
|||
INVALID = "INVALID",
|
||||
INVALID_CREDENTIALS = "INVALID_CREDENTIALS",
|
||||
INVALID_PASSWORD = "INVALID_PASSWORD",
|
||||
JWT_DECODE_ERROR = "JWT_DECODE_ERROR",
|
||||
JWT_INVALID_CSRF_TOKEN = "JWT_INVALID_CSRF_TOKEN",
|
||||
JWT_INVALID_TOKEN = "JWT_INVALID_TOKEN",
|
||||
JWT_MISSING_TOKEN = "JWT_MISSING_TOKEN",
|
||||
JWT_SIGNATURE_EXPIRED = "JWT_SIGNATURE_EXPIRED",
|
||||
LEFT_NOT_MANAGEABLE_PERMISSION = "LEFT_NOT_MANAGEABLE_PERMISSION",
|
||||
NOT_FOUND = "NOT_FOUND",
|
||||
OUT_OF_SCOPE_GROUP = "OUT_OF_SCOPE_GROUP",
|
||||
|
@ -502,6 +507,7 @@ export enum OrderEventsEnum {
|
|||
ORDER_MARKED_AS_PAID = "ORDER_MARKED_AS_PAID",
|
||||
OTHER = "OTHER",
|
||||
OVERSOLD_ITEMS = "OVERSOLD_ITEMS",
|
||||
PAYMENT_AUTHORIZED = "PAYMENT_AUTHORIZED",
|
||||
PAYMENT_CAPTURED = "PAYMENT_CAPTURED",
|
||||
PAYMENT_FAILED = "PAYMENT_FAILED",
|
||||
PAYMENT_REFUNDED = "PAYMENT_REFUNDED",
|
||||
|
|
Loading…
Reference in a new issue