rp
04/27/2021, 3:47 PMuser
04/27/2021, 6:05 PMuser
04/27/2021, 6:32 PMcredentials
set to 'true'
and with adding the ST headers next to the default APIG headers?
2. does the /user
endpoint serve as an example for a functional endpoint like, for instance, getTasks
or createTask
?rp
04/27/2021, 6:41 PMrp
04/27/2021, 6:42 PMrp
04/27/2021, 6:42 PMuser
04/27/2021, 6:43 PMapp.use(
cors({
origin: "http://localhost:3000",
allowedHeaders: ["content-type", ...supertokens.getAllCORSHeaders()],
credentials: true,
methods: ["GET", "PUT", "POST", "DELETE", "OPTIONS"],
}),
)
?rp
04/27/2021, 6:43 PMuser
04/27/2021, 6:43 PMuser
04/27/2021, 6:43 PMuser
04/27/2021, 6:43 PMrp
04/27/2021, 6:44 PMZeferiniX
04/27/2021, 11:50 PMapiDomain
and/or websiteDomain
on the appInfo
? And what is it being used for?
https://supertokens.io/docs/nodejs/initZeferiniX
04/28/2021, 1:01 AMsession_info
table? just wondering if the session handle row for that user's session should be removed if the user signs outZeferiniX
04/28/2021, 1:02 AMrp
04/28/2021, 4:21 AMapiDomain
is used to query your APIs.
On the backend, the websiteDomain
is used to generate password reset / email verification links. The websiteDomain
is also used on the frontend fro routing purposes in case you have a dedicated sub domain for auth like auth.example.com
.
We plan on writing a page highlighting the significance of all the items in the appInfo
object since it's quite important.rp
04/28/2021, 4:23 AMrevokeSession
function does exactly that.gusfune
04/28/2021, 2:55 PM{ SignOut }
in NextJS? We seem to have the promise always pending and users are stuck forever with their session :/gusfune
04/28/2021, 2:55 PMrp
04/28/2021, 2:56 PMgusfune
04/28/2021, 2:57 PMimport { signOut } from "supertokens-auth-react/recipe/thirdpartyemailpassword"
<button
onClick={async () => {
await signOut()
mutate() //SWR stuff for
toggle() //closes the menu
router.push("/") //redirects
}}
>Logout</button>
rp
04/28/2021, 2:57 PMrp
04/28/2021, 2:58 PMgusfune
04/28/2021, 2:58 PMhttp://localhost:3000/api/auth/signout
gusfune
04/28/2021, 2:59 PM[[...path]].js
implementation without any customization.gusfune
04/28/2021, 2:59 PM[next] API resolved without sending a response for /api/auth/signout, this may result in stalled requests.
rp
04/28/2021, 3:00 PMrp
04/28/2021, 3:01 PMif (!res.writableEnded) {
res.status(404).send('Not found')
}
At the ned.rp
04/28/2021, 3:01 PMrp
04/28/2021, 3:01 PMrp
04/28/2021, 3:01 PM