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

Get user info route #18

Open
jackheuberger opened this issue Mar 13, 2023 · 1 comment
Open

Get user info route #18

jackheuberger opened this issue Mar 13, 2023 · 1 comment

Comments

@jackheuberger
Copy link
Contributor

jackheuberger commented Mar 13, 2023

FEATURE REQUEST

What do you want to happen

Based on a user's login id (from supertokens & prisma schema), fetch their information from the database

Anything else we need to know?

I'm not 100% sure how to do this "safely". From the sample supertokens HomeView.vue:

    async getUserInfo() {
      this.session = await Session.doesSessionExist();
      if (this.session) {
        this.userId = await Session.getUserId();
      }
    }

Is this "enough" to be safe? Could someone maliciously edit a session? The thing we want to prevent is someone passing in a userid that isn't their own to get other peoples' data.

@jackheuberger
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

1 participant