Skip to content

Organisation Claims not extracted from payload by to_auth() #206

@DuncanFoster

Description

@DuncanFoster

When retrieving an instance of RequestState via the authenticate_request() method, the organization information is visible in the payload variable but the to_auth() method does not include this in the returned AuthObject instance for the v2 API (which returns a SessionAuthObjectV2 instance). The expected "o" variable or organization claim is missing, which means the active organisation cannot be determined (although it can be retrieved from the payload but via dictionary keys, which is not desirable as it places the onus on developers to maintain this as opposed to relying on the SDK's mapping). Critically, this is necessary to determine which organization is active, as whilst the SDK can query Clerk to find all organizations for a given user, this does not provide any active information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions