-
-
Notifications
You must be signed in to change notification settings - Fork 959
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
34 additions
and
37 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
docs/docs/self-service/flows/code/login/samples/api/init.js.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {PublicApi} from '@oryd/kratos-client' | ||
import { Configuration, PublicApi } from '@oryd/kratos-client'; | ||
const kratos = new PublicApi(new Configuration({ basePath: 'http://127.0.0.1:4433/' })); | ||
|
||
const kratos = new PublicApi('http://127.0.0.1:4433/') | ||
kratos.initializeSelfServiceLoginViaAPIFlow() | ||
.then(({body}) => { | ||
console.log(body) // see the Raw HTTP tab for the payload | ||
.then(({ status, data: flow }) => { | ||
console.log(flow) // see the Raw HTTP tab for the payload | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import {CommonApi} from '@oryd/kratos-client' | ||
|
||
const kratos = new CommonApi('http://127.0.0.1:4433/') | ||
import { Configuration, PublicApi } from '@oryd/kratos-client'; | ||
const kratos = new PublicApi(new Configuration({ basePath: 'http://127.0.0.1:4433/' })); | ||
|
||
const flowId = '' // usually something like: req.query.flow | ||
|
||
kratos.getSelfServiceLoginFlow(flowId) | ||
.then(({body}) => { | ||
console.log(body) // see the Raw HTTP tab for the payload | ||
return kratos.getSelfServiceLoginFlow(flowId) | ||
.then(({ status, data: flow, ...response }) => { | ||
console.log(flow) // see the Raw HTTP tab for the payload | ||
}) |
8 changes: 4 additions & 4 deletions
8
docs/docs/self-service/flows/code/recovery/samples/api/init.js.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {PublicApi} from '@oryd/kratos-client' | ||
import { Configuration, PublicApi } from '@oryd/kratos-client'; | ||
const kratos = new PublicApi(new Configuration({ basePath: 'http://127.0.0.1:4433/' })); | ||
|
||
const kratos = new PublicApi('http://127.0.0.1:4433/') | ||
kratos.initializeSelfServiceRecoveryViaAPIFlow() | ||
.then(({body}) => { | ||
console.log(body) // see the Raw HTTP tab for the payload | ||
.then(({ status, data: flow }) => { | ||
console.log(flow) // see the Raw HTTP tab for the payload | ||
}) |
9 changes: 4 additions & 5 deletions
9
docs/docs/self-service/flows/code/recovery/samples/get.js.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import {CommonApi} from '@oryd/kratos-client' | ||
|
||
const kratos = new CommonApi('http://127.0.0.1:4433/') | ||
import { Configuration, PublicApi } from '@oryd/kratos-client'; | ||
const kratos = new PublicApi(new Configuration({ basePath: 'http://127.0.0.1:4433/' })); | ||
|
||
const flowId = '' // usually something like: req.query.flow | ||
|
||
kratos.getSelfServiceRecoveryFlow(flowId) | ||
.then(({body}) => { | ||
console.log(body) // see the Raw HTTP tab for the payload | ||
.then(({ status, data: flow, ...response }) => { | ||
console.log(flow) // see the Raw HTTP tab for the payload | ||
}) |
8 changes: 4 additions & 4 deletions
8
docs/docs/self-service/flows/code/registration/samples/api/init.js.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {PublicApi} from '@oryd/kratos-client' | ||
import { Configuration, PublicApi } from '@oryd/kratos-client'; | ||
const kratos = new PublicApi(new Configuration({ basePath: 'http://127.0.0.1:4433/' })); | ||
|
||
const kratos = new PublicApi('http://127.0.0.1:4433/') | ||
kratos.initializeSelfServiceRegistrationViaAPIFlow() | ||
.then(({body}) => { | ||
console.log(body) // see the Raw HTTP tab for the payload | ||
.then(({ status, data: flow }) => { | ||
console.log(flow) // see the Raw HTTP tab for the payload | ||
}) |
9 changes: 4 additions & 5 deletions
9
docs/docs/self-service/flows/code/registration/samples/get.js.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
import {CommonApi} from '@oryd/kratos-client' | ||
|
||
const kratos = new CommonApi('http://127.0.0.1:4433/') | ||
import { Configuration, PublicApi } from '@oryd/kratos-client'; | ||
const kratos = new PublicApi(new Configuration({ basePath: 'http://127.0.0.1:4433/' })); | ||
|
||
const flowId = '' // usually something like: req.query.flow | ||
|
||
kratos.getSelfServiceRegistrationFlow(flowId) | ||
.then(({body}) => { | ||
console.log(body) // see the Raw HTTP tab for the payload | ||
.then(({ status, data: flow, ...response }) => { | ||
console.log(flow) // see the Raw HTTP tab for the payload | ||
}) |
10 changes: 5 additions & 5 deletions
10
docs/docs/self-service/flows/code/settings/samples/api/init.js.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {PublicApi} from '@oryd/kratos-client' | ||
import { Configuration, PublicApi } from '@oryd/kratos-client'; | ||
const kratos = new PublicApi(new Configuration({ basePath: 'http://127.0.0.1:4433/' })); | ||
|
||
const kratos = new PublicApi('http://127.0.0.1:4433/') | ||
kratos.initializeSelfServiceRegistrationViaAPIFlow() | ||
.then(({body}) => { | ||
console.log(body) // see the Raw HTTP tab for the payload | ||
kratos.initializeSelfServiceSettingsViaAPIFlow() | ||
.then(({ status, data: flow }) => { | ||
console.log(flow) // see the Raw HTTP tab for the payload | ||
}) |
8 changes: 4 additions & 4 deletions
8
docs/docs/self-service/flows/code/settings/samples/get.js.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
import {CommonApi} from '@oryd/kratos-client' | ||
import { AdminApi, Configuration } from '@oryd/kratos-client'; | ||
|
||
// We are using the ORY Kratos Admin API (:4434) to avoid having to set the session cookie / session token: | ||
const kratos = new CommonApi('http://127.0.0.1:4434/') | ||
const kratos = new AdminApi(new Configuration({ basePath: 'http://127.0.0.1:4434/' })); | ||
|
||
const flowId = '' // usually something like: req.query.flow | ||
|
||
kratos.getSelfServiceSettingsFlow(flowId) | ||
.then(({body}) => { | ||
console.log(body) // see the Raw HTTP tab for the payload | ||
.then(({ status, data: flow, ...response }) => { | ||
console.log(flow) // see the Raw HTTP tab for the payload | ||
}) |