Skip to content

Commit

Permalink
docs: correct SDK use in quickstart
Browse files Browse the repository at this point in the history
Closes #430
  • Loading branch information
aeneasr committed Jun 5, 2020
1 parent 2ab5ead commit 7ca81f0
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/docs/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,16 @@ To ensure that no one can access the dashboard without prior authentication
```js
// Import the ORY Kratos SDK. SDKs are available for all popular programming
// languages! We will add examples for other programming languages here soon.
import { KratosPublicSDK } from '@oryd/kratos-client';
import {
AdminApi,
PublicApi,
} from '@oryd/kratos-client'

const publicEndpoint = new PublicApi('https://public.ory-kratos')
const adminEndpoint = new AdminApi('https://admin.ory-kratos')

const needsLogin = (req, res, next) => {
new KratosPublicSDK('https://public.ory-kratos')
new publicEndpoint
.whoami(req)
.then(({ body }) => {
req.user = { session: body };
Expand Down

0 comments on commit 7ca81f0

Please sign in to comment.