AuthN | Node SDK | Flow Endpoints
Flow Endpoints
Check a token
check(token: string): Promise<PangeaResponse<CheckResult>>Look up a token and return its contents.
const response = await authn.client.clientToken.check(
"ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
);
Complete sign-up/sign-in
complete(flowID: string): Promise<PangeaResponse<CompleteResult>>Complete a login or signup flow.
const response = await authn.flow.complete(
"pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh"
);
Restart a sign-up/sign-in flow
restart(request: RestartRequest): Promise<PangeaResponse<RestartResult>>Restart a signup-up/in flow choice.
const response = await authn.flow.restart({
flow_id: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
choice: AuthN.Flow.Choice.PASSWORD,
data: {},
});
Start a sign-up/sign-in flow
start(request: StartRequest): Promise<PangeaResponse<StartResult>>Start a new signup or signin flow.
const response = await authn.flow.start({
email: "joe.user@email.com",
cb_uri: "https://www.myserver.com/callback",
flow_types: [
AuthN.FlowType.SIGNIN,
AuthN.FlowType.SIGNUP,
],
invitation: "pmc_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
});
Update a sign-up/sign-in flow
update(request: UpdateRequest): Promise<PangeaResponse<UpdateResult>>Update a sign-up/sign-in flow.
const response = await authn.flow.update({
flow_id: "pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
choice: AuthN.Flow.Choice.PASSWORD,
data: {
password: "someNewPasswordHere",
},
});
Namespace Flow
FlowEnum FlowType
FlowTypeSIGNIN
= "signin"
SIGNUP
= "signup"