https://supertokens.com/ logo
Title
a

Andhika Gaki

01/31/2023, 8:39 AM
Hello, im here trying to use golang as connector the middleware, do you have a documentation how to call the libraries? a little bit confuse to just read the code 1 by 1
r

rp

01/31/2023, 8:42 AM
hey @Andhika Gaki
please pick the guides and follow the docs.
a

Andhika Gaki

01/31/2023, 9:18 AM
I did, i do follow the password less recipe, all been setup well, FE -> BE -> Middleware and the database its been setup, but here is the things, every api i called is return 200 ok without any {body}. i think i must setup the thing inside that code but im not sure what need to call
r

rp

01/31/2023, 9:20 AM
the TODO comment essentially should be replaced by your application APIs routes
a

Andhika Gaki

01/31/2023, 9:35 AM
i see, can we just use "npx create-supertokens-app@latest --recipe=passwordless" to try the environment?
r

rp

01/31/2023, 9:45 AM
yea
a

Andhika Gaki

01/31/2023, 9:51 AM
r

rp

01/31/2023, 9:54 AM
yea
a

Andhika Gaki

01/31/2023, 11:12 AM
nah, everytime i call /auth is always return 404, i think because of this function.
r

rp

01/31/2023, 11:12 AM
there is no route like /auth that we expose
see the api spec please.
a

Andhika Gaki

01/31/2023, 11:12 AM
wait
for the default it self what is the apibasepath?
so i can try it on postman
r

rp

01/31/2023, 11:17 AM
/auth
a

Andhika Gaki

01/31/2023, 12:04 PM
I did run the default setup and try to call http://localhost:3001/auth/signup/phonenumber/exist?phoneNumber?081133334222 got the 404
i see there is path /sessioninfo that will sent to the 404 if there is no path /sessioninfo. any thought of that?
r

rp

01/31/2023, 1:01 PM
thats just an example api
you can enable backend debug logs and show the output?
a

Andhika Gaki

01/31/2023, 4:41 PM
i got the answer thank btw, i do try self hosted on my local using postgresql, i did sign up and can do sign in, but in my database data user is not written
r

rp

01/31/2023, 5:07 PM
are you sure you provided the correct postgresql connection info to the core?
a

Andhika Gaki

02/01/2023, 3:38 AM
Sure the setting is in the middleware config.yaml right?
and the be connection is setting like that
r

rp

02/01/2023, 6:21 AM
yea. but is the core connected to your db at all?
a

Andhika Gaki

02/01/2023, 6:35 AM
it is will be set up on here?
r

rp

02/01/2023, 6:40 AM
yes
a

Andhika Gaki

02/01/2023, 7:36 AM
is this one the core setup? how to check it connected or not?
r

rp

02/01/2023, 7:54 AM
try signing up a user and seeing if it connects to the db or not
a

Andhika Gaki

02/01/2023, 9:10 AM
the return is OK but still not inserted into the db
r

rp

02/01/2023, 9:24 AM
which config yaml have you edited? the one in the installation directory or in the downloaded zip?
a

Andhika Gaki

02/01/2023, 9:40 AM
changed the config.yaml in the installation directory
is that correct?
r

rp

02/01/2023, 9:41 AM
yea. In installation dir is correct
can you start the core in foreground and show me the logs?
a

Andhika Gaki

02/01/2023, 9:43 AM
do you mean the middleware core? like that?
where the logs is located?
r

rp

02/01/2023, 9:55 AM
so it'
its using the in memory storager
oh i see..
in the config yaml file, you added the connection uri, but you did not uncomment that line..
remove the leading
#
from the postgresql_connection_uri line
a

Andhika Gaki

02/01/2023, 10:17 AM
i think its still not connected, but im still confused why the API is returning 200
r

rp

02/01/2023, 10:42 AM
you need to restart the core.
a

Andhika Gaki

02/01/2023, 2:52 PM
i do restart the core but still not connected to the database
r

rp

02/01/2023, 2:52 PM
Can you show me the config.yaml file?
a

Andhika Gaki

02/01/2023, 2:53 PM
the part i edited only on the connection uri
r

rp

02/01/2023, 2:55 PM
Hmm. What’s the location of this config file ok your machine?
On*
a

Andhika Gaki

02/01/2023, 2:56 PM
here its on the OS location C:\Users\62813\Downloads\supertokens
r

rp

02/01/2023, 2:57 PM
Yeaaaa. That’s not the right one
You need to edit the one in the installation directory
Run supertokens —help
a

Andhika Gaki

02/01/2023, 2:59 PM
its suppose to be like this right?
r

rp

02/01/2023, 2:59 PM
Yes
Edit the config file which is shown in the output
a

Andhika Gaki

02/01/2023, 3:28 PM
i cannot run the supertokens that inside the default path, have you chase this case?
or can i just run the supertoken outside?
r

rp

02/01/2023, 3:29 PM
Hey. Iv spent enough time trying to help out. Our docs are pretty clear. If things don’t work, try our docker image 🙂
a

Andhika Gaki

02/01/2023, 3:32 PM
oo okay, thank mate
for your help
its work, will inform my head of IT. thank you can closed the case
r

rp

02/01/2023, 3:44 PM
Ok great