Replies: 1 comment 7 replies
-
|
Thanks for all the info and code snippets! Where are you making the axios call from? |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I'm facing some issues with session on the server side and i'd appreciate if someone guides me to right path.
So i'm building a telegram bot and a website, both integrated in the same blitz app.
The website serves as a frontend with minimal features as most of the core functionalities are done using the bot.
Going through the docs on session management, it seems server side session mgt(fetch session and update session) can be done either through the api routes or getServerSideProps.
Authentication on my app is done through the bot by going through some wizard scenes which at the end, creates a user account and saves some basic info in session using
ctx.session.$create()In order to create user session during account creation, i had to first create an api route where i can make use of getSession
Here's how i do it:
To access the session created from the above code, i followed this and put
antiCSRFTokenin my axios header which i use to call mygetSessionapi endpoint, but it resulted in errors.The reason why i want to use session, is to avoid querying the db all the time for basic info which was stored in session during account creation.
Beta Was this translation helpful? Give feedback.
All reactions