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

Add support for sessions #29

Open
smeijer opened this issue Sep 25, 2021 · 1 comment
Open

Add support for sessions #29

smeijer opened this issue Sep 25, 2021 · 1 comment
Labels
🤔 idea Just an idea, comment and vote if you have an opinion on this.

Comments

@smeijer
Copy link
Owner

smeijer commented Sep 25, 2021

I was thinking to add basic session support, something self baked or using cookie-session. Haven't thought it through yet.

That would mean that the context would get an session prop.

export const getServerSideProps = handle({
  async get({ session }) {
    session.get('user');
    session.set('user', 'smeijer');
  },
});
@smeijer smeijer added the 🤔 idea Just an idea, comment and vote if you have an opinion on this. label Sep 25, 2021
@vasco3
Copy link
Contributor

vasco3 commented Jun 13, 2022

how do you handle auth?
I am trying to use @auth0/nextjs-auth0 but haven't figure out how to make it work with next-runtime.

I tried using withPageAuthRequired as a middleware of handle but didn't return the get props.

I got it to work by wrapping the Page component export default withPageAuthRequired(Home); but then I don't know how to get session from within runtime get

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤔 idea Just an idea, comment and vote if you have an opinion on this.
Projects
None yet
Development

No branches or pull requests

2 participants