Skip to main content

AuthN | Python SDK | Flow Endpoints

Flow Endpoints

Check a token

authn.client.token_endpoints.check(token)

Look up a token and return its contents.

required parameters

str

A token value

Response Object

A PangeaResponse with a token and its information in the response.result field. Available response fields can be found in our API Documentation.

response = authn.client.token_endpoints.check(
    token="ptu_wuk7tvtpswyjtlsx52b7yyi2l7zotv4a",
)

Complete sign-up/sign-in

authn.flow.complete(flow_id)

Complete a login or sign-up flow.

required parameters

str

An ID for a login or signup flow

Response Object

A PangeaResponse with credentials for a login session in the response.result field. Available response fields can be found in our API Documentation.

response = authn.flow.complete(
    flow_id="pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
)

Restart a sign-up/sign-in flow

authn.flow.restart(flow_id, choice, data)

Restart a signup-up/in flow choice.

required parameters

str

An ID for a login or signup flow

m.FlowChoice

Flow choice

optional parameters

m.FlowRestartData

Response Object

A PangeaResponse with information about next steps needed to complete a flow in the response.result field. Available response fields can be found in our API Documentation.

response = authn.flow.restart(
    flow_id="pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
    choice=FlowChoice.PASSWORD,
    data: {},
)

Start a sign-up/sign-in flow

authn.flow.start(cb_uri, email, flow_types, invitation)

Start a new signup or signin flow.

optional parameters

str

A login callback URI

str

An email address

List[m.FlowType]

A list of flow types

str

A one-time ticket

Response Object

A PangeaResponse with information about next steps needed to complete a flow in the response.result field. Available response fields can be found in our API Documentation.

response = authn.flow.start(
    cb_uri="https://www.myserver.com/callback",
    email="joe.user@email.com",
    flow_types=[
        FlowType.SIGNUP,
        FlowType.SIGNIN,
    ],
)

Update a sign-up/sign-in flow

authn.flow.update(flow_id, choice, data)

Update a sign-up/sign-in flow.

required parameters

str

An ID for a login or signup flow

m.FlowChoice

Flow choice

optional parameters

dict

Response Object

A PangeaResponse with information about next steps needed to complete a flow in the response.result field. Available response fields can be found in our API Documentation.

response = authn.flow.update(
    flow_id="pfl_dxiqyuq7ndc5ycjwdgmguwuodizcaqhh",
    choice=FlowChoice.PASSWORD,
    data={
        "password": "someNewPasswordHere",
    },
)