Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-native-sessions #504

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

react-native-sessions #504

wants to merge 6 commits into from

Conversation

moeodeh3
Copy link
Contributor

@moeodeh3 moeodeh3 commented Feb 13, 2025

Summary & Motivation

Session management is tedious to do in RN - so we abstract it :)

How I Tested These Changes

I made a local build and tried it in the react-native-demo-wallet

Did you add a changeset?

If updating one of our packages, you'll likely need to add a changeset to your PR. To do so, run pnpm changeset. pnpm changeset will generate a file where you should write a human friendly message about the changes. Note how this (example) includes the package name (should be auto added by the command) along with the type of semver change (major.minor.patch) (which you should set).

These changes will be used at release time to determine what packages to publish and how to bump their version. For more context see this comment.

Copy link

socket-security bot commented Feb 13, 2025

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None 0 204 kB oblador
npm/[email protected] 🔁 npm/[email protected] Transitive: eval, filesystem, shell, unsafe +402 188 MB react-native-bot

View full report↗︎

Copy link

codesandbox-ci bot commented Feb 13, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link
Contributor

@moe-dev moe-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG at a glance. need to add to the package to code sandbox ci json

Copy link
Collaborator

@taylorjdawson taylorjdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! left a few comments

Comment on lines 8 to 12
type Session = {
publicKey: string;
privateKey: string;
expiry: number;
};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add any additional info here like the organizationId? Sometimes that can be helpful but maybe it is stored somewhere else in the react-native-demo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we were to do this then I think we should store the entire User object as well. Currently we store the user (and org id) in the turnkey provider here: https://github.com/tkhq/react-native-demo-wallet/blob/main/providers/turnkey.tsx.

Overall I am not strongly opinionated on this, I am fine with whatever decision you make

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we add it here that would mean we wouldn't need to fetch the orgId here I think right?

I would say lets store the User object, since we do this in the sdk-browser? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense - going to get started on this now

packages/react-native-sessions/src/index.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants