rp
04/12/2021, 2:17 PMdeltasoneca
04/13/2021, 12:48 PM> Build error occurred
Error: automatic static optimization failed: found pages without a React Component as default export in
I just moved the file out of pages/
(into a folder that I named config/
) and it fixed it.rp
04/13/2021, 12:48 PMtheefunklord
04/14/2021, 7:50 PMenv.
variables as well. So I can't access my dev/prod (Managed Service) users, or any of the MySQL users when logging in- "Something went wrong" Error.
My local setup seems to work fine, connecting to my production instance https://f9537f518b9c11eba49dcbf073da756f-us-east-1.aws.supertokens.io:3567
Are there any env.
or configuration steps I need to review? Thanks!rp
04/15/2021, 4:05 AMrp
04/15/2021, 4:06 AMtheefunklord
04/15/2021, 12:01 PMrp
04/15/2021, 12:03 PMrp
04/15/2021, 12:07 PMrp
04/15/2021, 12:08 PMrp
04/15/2021, 12:08 PMrp
04/15/2021, 12:09 PMsupertokens.init(SuperTokensConfig.backendConfig())
rp
04/15/2021, 12:09 PMtheefunklord
04/15/2021, 12:12 PMSuperTokensNode.init({
is sitting in my _app.js
file. So I'll give this a go.
Thanks @rp!rp
04/15/2021, 12:13 PMsupertokensConfig.js
should not be in the pages
folder. Instead put it in a folder called config
(as an example).rp
04/15/2021, 12:13 PMconfig
should be at the root of the projecttheefunklord
04/15/2021, 3:36 PMtheefunklord
04/15/2021, 3:36 PMokukubambo
04/15/2021, 3:55 PMrp
04/15/2021, 3:56 PM/hello
APIokukubambo
04/15/2021, 3:56 PMrp
04/15/2021, 3:58 PMrp
04/15/2021, 3:58 PMtheefunklord
04/15/2021, 5:31 PMEmailPassword.init
property to hide signUp functionality? I have property for palette
and the CSS display:none
is fine, however the link is still available in the DOM.
My goal: After validating against my database, I'm attempting to prevent outsiders from Signing Up. Sign in will ideally just validate with the db for user login. and I will manually create my users.theefunklord
04/15/2021, 5:42 PMrp
04/15/2021, 7:18 PMapp.use(supertokens.middleware())
and check for an API key in the header if the route is {apiBasePath}/signup
and the method is POST
.
Alternatively, you can disable the default sign up API entirely by setting the disableDefaultImplementation
to true
in the signupFeature
object when calling the init
function in the node SDK. But of course, you would still need to make an API to manually add users, so i'd go with the API key approach π
- The second part of hiding the UI can be achieved by CSS manipulation by setting headerSubtitle
to have display: none
. I don't undertsand when you say "however the link is still available in the DOM."rp
04/15/2021, 7:22 PMdisableDefaultImplementation
to true
in signInAndUpFeature
when calling the init
function (see https://supertokens.io/docs/auth-react/emailpassword/init). This will basically remove the UI from /auth
. This mean you can handle this route to render anything you like.
- Then you would need to create your own component to show the login UI:
js
import {SignInAndUp} from "supertokens-auth-react/recipe/emailpassword";
render() {
return (
<SignInAndUp>
<YOUR UI COMPONENT GOES HERE>
</SignInAndUp>
);
}
rp
04/15/2021, 7:23 PMtheefunklord
04/15/2021, 8:56 PMdisplay:none
, someone could still inspect the page, disable the :none
value, and theoretically access the Sign Up link (data-supertokens="headerSubtitle"
or secondaryText
).
I'll see what I can come up with using disableDefaultImplementation
. Outstanding once again with the reply. I appreciate the helprp
04/16/2021, 4:30 AM