ory / ory/sdk

tokenize_as not being set with xSessionToken is set

Open
#307 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
178
Forks
96
Avg merge
6d 23h
Merged PRs (30d)
3

Description

Preflight checklist
Ory Network Project

No response

Describe the bug

Using react native I'm trying to use

await sdk
        // whoami() returns the session belonging to the session_token:
        .toSession({ xSessionToken: auth.session_token, tokenizeAs: "jwt_template" })

But it doesn't seem to be setting the tokenize_at query param so it's not giving me back the expected JWT. If I convert this to a simple fetch it works as expected.

Reproducing the bug

https://github.com/ory/kratos-selfservice-ui-react-native/tree/master

Switch to using JWTs for auth.

Relevant log output

No response

Relevant configuration

No response

Version

1.4.0

On which operating system are you observing this issue?

macOS

In which environment are you deploying?

Ory Network

Additional Context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the React Native reproducer and the SDK's toSession call, comparing its request with the working simple fetch. Verify that passing xSessionToken and tokenizeAs sends the tokenize_at query parameter and returns the expected JWT; the issue provides no specific SDK file or test location.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, react-native
Domain
api, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.