https://supertokens.com/ logo
s

shubham vora

04/21/2022, 4:45 AM
How to change URLWithLinkCode in the frontend part? Here, ia my code. I want to modifie it and send it to user's mail.
r

rp

04/21/2022, 4:46 AM
How to change URLWithLinkCode in the frontend part? Here, ia my code. I want to modifie it and send it to user's mail.
Hey
How do you want to modify it?
s

shubham vora

04/21/2022, 4:47 AM
I want to remove some parameter like rid=passwordless, and add parameter linkcode
this is real one.
rather than sending id as parameter, i want to send it as routes
r

rp

04/21/2022, 4:49 AM
Ah ok. You can modify it on the backend function where you send the email
But if you are changing the path of th url, then you will have to handle that on the frontend yourself
s

shubham vora

04/21/2022, 4:49 AM
but how?
r

rp

04/21/2022, 4:49 AM
Using js
s

shubham vora

04/21/2022, 4:49 AM
ya! i am managing it with custom ui
so i am asking
r

rp

04/21/2022, 4:50 AM
I mean u have the urlWithLinkCode In that function. It’s a string. U can manipulate it however you like
s

shubham vora

04/21/2022, 4:51 AM
ok. got it.
how to manage session for passwordless recipe?
any docs or?
r

rp

04/21/2022, 6:50 AM
There is a session section in the passwordless docs. In common customisation.
s

shubham vora

04/21/2022, 6:51 AM
ok.
should i use JWT for session or other is available?
r

rp

04/21/2022, 10:53 AM
Try to avoid JWT for sessions
The default should work
s

shubham vora

04/21/2022, 10:54 AM
so, when i loggin it instantly logouts
r

rp

04/21/2022, 10:54 AM
Can you enable debug logging and make the call to login?
s

shubham vora

04/21/2022, 10:54 AM
and makes request it shows like this
r

rp

04/21/2022, 10:54 AM
And show me the output
It’s probably some misconfiguration from your end
s

shubham vora

04/21/2022, 10:55 AM
login done successfully
i am building custome ui
r

rp

04/21/2022, 10:55 AM
Can you enable debug logging and show me the output? From the backend SDK
s

shubham vora

04/21/2022, 10:55 AM
sure.
what exactly you need to see in backend? bcz i think i don't have any output for backend
as i told you yesterday i have copied both files of backend
r

rp

04/21/2022, 10:57 AM
I want to see the output logs when u call the api
So that I can help you debug the session issue
s

shubham vora

04/21/2022, 10:58 AM
I think i have to edit the session.init(). AM i right?
r

rp

04/21/2022, 10:58 AM
You shouldn’t need to. By default it figures out the right settings
Again, if you can enable debug logs on the backend and show me, I can help 🙂
Otherwise it’s difficult to know what’s wrong
s

shubham vora

04/21/2022, 10:59 AM
ya! showing you.
simply, I am making request here and getting the output which i sent you.
r

rp

04/21/2022, 11:00 AM
You haven’t enabled debug logging
See the trouble shooting section in the docs
s

shubham vora

04/21/2022, 11:00 AM
i am not able to undestand!
bcz i can't see anything where i am making request in my index.js file
r

rp

04/21/2022, 11:01 AM
Please see the troubleshooting section in the docs
That will show you how to enable debug logging
s

shubham vora

04/21/2022, 11:01 AM
ya! got it
r

rp

04/21/2022, 11:01 AM
Then you can make a request to the /sessioninfo and see why it’s returning 401
s

shubham vora

04/21/2022, 11:01 AM
ok.
where i have to set this?
SET DEBUG=com.supertokens
r

rp

04/21/2022, 11:02 AM
Terminal
Run that command on the terminal
s

shubham vora

04/21/2022, 11:03 AM
it's giving error
r

rp

04/21/2022, 11:03 AM
Are you using windows?
s

shubham vora

04/21/2022, 11:03 AM
yes
is there any other way?
r

rp

04/21/2022, 11:04 AM
How to set env var in windows?
s

shubham vora

04/21/2022, 11:04 AM
using .env file
r

rp

04/21/2022, 11:05 AM
Yea. You can use .env file too
s

shubham vora

04/21/2022, 11:05 AM
ok.
r

rp

04/21/2022, 11:05 AM
In that, ass DEBUG=com.supertokens
s

shubham vora

04/21/2022, 11:05 AM
is it correct?
r

rp

04/21/2022, 11:05 AM
Without the set
And put the com.supertokens I’m quotes
In*
s

shubham vora

04/21/2022, 11:06 AM
now, is hould run?
*should
r

rp

04/21/2022, 11:06 AM
Yea. True
Try*
What version of the SDK are you using?
s

shubham vora

04/21/2022, 11:07 AM
latest
r

rp

04/21/2022, 11:08 AM
Not sure. You need to figure how to set this env var on windows
s

shubham vora

04/21/2022, 11:08 AM
let me do it.
r

rp

04/21/2022, 11:08 AM
Just try “DEBUG=com.supertokens node index.js”
s

shubham vora

04/21/2022, 11:09 AM
it's working
r

rp

04/21/2022, 11:09 AM
Ok great. Now let’s see the logs
Can you paste all the logs and share it in a file?
So in postman, it seems that your access token has expired. Did you login a long time ago?
Or just now? (In postman)
s

shubham vora

04/21/2022, 11:11 AM
before 25 mintues
r

rp

04/21/2022, 11:11 AM
Yea. So call the login API again in postman and see if the endpoint works
s

shubham vora

04/21/2022, 11:11 AM
what is the expiry time? I also want to change it.
ok.
r

rp

04/21/2022, 11:11 AM
1 hour expiry time.
Alternatively, you can refresh the session by calling the refresh api
s

shubham vora

04/21/2022, 11:12 AM
how to do that?
r

rp

04/21/2022, 11:12 AM
See the section in testing -> with postman (in docs)
s

shubham vora

04/21/2022, 11:14 AM
so, Basically i have loggedin using frontend part and checking about session using postman. so, it matters?
or both thing i should do from postman only or frontend only
r

rp

04/21/2022, 11:14 AM
You need to call the login api in postman too
I mean the browser session is different from postman session.. they are different clients
s

shubham vora

04/21/2022, 11:15 AM
oh! got it!
r

rp

04/21/2022, 11:15 AM
You can’t login to the browser and expect a session in postman to work.
(And vice versa)
s

shubham vora

04/21/2022, 11:15 AM
let me check if my postman is fine than bbrowser is also fine
login successful
got it man!
thank you so much! you are helping me from last 2 days.
2 Views