https://supertokens.com/ logo
d

Dhr_RT

04/10/2022, 12:58 PM
I want to use process.env for the secrets. I am checking for non nullish, but the system crashes
r

rp

04/10/2022, 12:59 PM
this error doesn't seem to be coming from supertokens.
d

Dhr_RT

04/10/2022, 12:59 PM
ok
People are able to use process.env inside the token recipe correctl
r

rp

04/10/2022, 12:59 PM
Yes.
d

Dhr_RT

04/10/2022, 1:00 PM
Can I make a suggestion for the code? That the non nullish check will be built in?
r

rp

04/10/2022, 1:00 PM
Well, our code accepts only type string.
So no point in having a non nullish check
(from our point of view)
d

Dhr_RT

04/10/2022, 1:01 PM
This is what happens when I dont have the code
r

rp

04/10/2022, 1:01 PM
Ah right I see. Ok makes sense
d

Dhr_RT

04/10/2022, 1:01 PM
I can easily set the ! to it
r

rp

04/10/2022, 1:01 PM
You could open an issue about this and we can work on this as and when we come around to it 🙂
d

Dhr_RT

04/10/2022, 1:01 PM
but yea..
👍
r

rp

04/10/2022, 1:02 PM
for now you can do
process.env.GOOGLE_CLIENT_ID as any
d

Dhr_RT

04/10/2022, 1:02 PM
just to fully understand, what is the main difference from that compared to
process.env.GOOGLE_CLIENT_ID!
r

rp

04/10/2022, 1:03 PM
nothing.
process.env.GOOGLE_CLIENT_ID!
is better
d

Dhr_RT

04/10/2022, 1:03 PM
Thanks
2 Views