Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Commit

Permalink
feat: upgrade kratos and other dependencies (#130)
Browse files Browse the repository at this point in the history
Co-authored-by: Samer Buna <[email protected]>
  • Loading branch information
samerbuna and samerbuna authored Sep 7, 2022
1 parent 99b52ff commit 5d86b21
Show file tree
Hide file tree
Showing 16 changed files with 407 additions and 441 deletions.
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.7"

services:
kratos-migrate:
image: oryd/kratos:v0.9.0-alpha.2
image: oryd/kratos:v0.10.1
depends_on:
- postgres
environment:
Expand All @@ -20,7 +20,7 @@ services:
- intranet

kratos:
image: oryd/kratos:v0.9.0-alpha.2
image: oryd/kratos:v0.10.1
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
depends_on:
- postgres
Expand Down
2 changes: 1 addition & 1 deletion src/components/kratos/Flow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
SubmitSelfServiceSettingsFlowBody,
SubmitSelfServiceVerificationFlowBody,
UiNode,
} from "@ory/kratos-client"
} from "@ory/client"

import { Messages } from "components/kratos/Messages"
import { Node } from "components/kratos/Node"
Expand Down
2 changes: 1 addition & 1 deletion src/components/kratos/Messages.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UiText } from "@ory/kratos-client"
import { UiText } from "@ory/client"

import { TranslationKey, translate, translateUnknown } from "store/index"

Expand Down
2 changes: 1 addition & 1 deletion src/components/kratos/Node.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
isUiNodeScriptAttributes,
isUiNodeTextAttributes,
} from "@ory/integrations/ui"
import { UiNode } from "@ory/kratos-client"
import { UiNode } from "@ory/client"

import { NodeAnchor } from "components/kratos/NodeAnchor"
import { NodeImage } from "components/kratos/NodeImage"
Expand Down
2 changes: 1 addition & 1 deletion src/components/kratos/NodeAnchor.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UiNodeAnchorAttributes, UiNode } from "@ory/kratos-client"
import { UiNodeAnchorAttributes, UiNode } from "@ory/client"
import { Button } from "@ory/themes"

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/components/kratos/NodeImage.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UiNode, UiNodeImageAttributes } from "@ory/kratos-client"
import { UiNode, UiNodeImageAttributes } from "@ory/client"

interface Props {
node: UiNode
Expand Down
2 changes: 1 addition & 1 deletion src/components/kratos/NodeScript.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UiNode, UiNodeScriptAttributes } from "@ory/kratos-client"
import { UiNode, UiNodeScriptAttributes } from "@ory/client"
import { HTMLAttributeReferrerPolicy, useEffect } from "react"

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/components/kratos/NodeText.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UiText, UiNode, UiNodeTextAttributes } from "@ory/kratos-client"
import { UiText, UiNode, UiNodeTextAttributes } from "@ory/client"
import { CodeBox, P } from "@ory/themes"

interface Props {
Expand Down
2 changes: 1 addition & 1 deletion src/components/kratos/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UiNode, UiNodeInputAttributes } from "@ory/kratos-client"
import { UiNode, UiNodeInputAttributes } from "@ory/client"
import { FormEvent } from "react"

export type ValueSetter = (value: string | number | boolean | undefined) => Promise<void>
Expand Down
4 changes: 2 additions & 2 deletions src/components/pages/login-email.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable camelcase */
import { useState, useEffect, useCallback } from "react"
import { useErrorHandler } from "react-error-boundary"
import { SelfServiceLoginFlow, SubmitSelfServiceLoginFlowBody } from "@ory/kratos-client"
import { SelfServiceLoginFlow, SubmitSelfServiceLoginFlowBody } from "@ory/client"

import {
KratosSdk,
Expand Down Expand Up @@ -42,7 +42,7 @@ const LoginEmail: FCT = ({ flowData: flowDataProp }) => {
const flowId = params.get("flow")
const returnTo = params.get("return_to")
const refresh = params.get("refresh")
const aal = params.get("all")
const aal = params.get("aal")

// flow id exists, we can fetch the flow data
if (flowId) {
Expand Down
5 changes: 1 addition & 4 deletions src/components/pages/recovery.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* eslint-disable camelcase */
import { useState, useEffect, useCallback } from "react"
import {
SelfServiceRecoveryFlow,
SubmitSelfServiceRecoveryFlowBody,
} from "@ory/kratos-client"
import { SelfServiceRecoveryFlow, SubmitSelfServiceRecoveryFlowBody } from "@ory/client"

import { config, translate, history } from "store/index"
import {
Expand Down
2 changes: 1 addition & 1 deletion src/components/pages/register.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useErrorHandler } from "react-error-boundary"
import {
SelfServiceRegistrationFlow,
SubmitSelfServiceRegistrationFlowBody,
} from "@ory/kratos-client"
} from "@ory/client"

import { config, translate, history, useAuthContext } from "store/index"
import {
Expand Down
5 changes: 1 addition & 4 deletions src/components/pages/settings.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
/* eslint-disable camelcase */
import { useCallback, useEffect, useState } from "react"
import {
SelfServiceSettingsFlow,
SubmitSelfServiceSettingsFlowBody,
} from "@ory/kratos-client"
import { SelfServiceSettingsFlow, SubmitSelfServiceSettingsFlowBody } from "@ory/client"

import { translate } from "store/translate"

Expand Down
3 changes: 1 addition & 2 deletions src/kratos/sdk.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Configuration } from "@ory/client"
import { V0alpha2ApiInterface, V0alpha2Api } from "@ory/kratos-client"
import { Configuration, V0alpha2ApiInterface, V0alpha2Api } from "@ory/client"

export const KratosSdk: (kratosEndpoint?: string) => V0alpha2ApiInterface = (
kratosEndpoint = process.env.KRATOS_API_URL as string,
Expand Down
2 changes: 1 addition & 1 deletion src/kratos/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
SelfServiceRegistrationFlow,
SelfServiceSettingsFlow,
Session as KratosSession,
} from "@ory/kratos-client"
} from "@ory/client"
import { Request } from "express"

import { KratosSdk } from "kratos/sdk"
Expand Down
Loading

0 comments on commit 5d86b21

Please sign in to comment.