-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Module not found: Can't resolve 'fs' with Next.js #127
Comments
@carolina-cascade we currently do not support any client side usage of the Nodejs SDK. The use of our SSWS token inside of the SDK would mean that having this used on client side could potentially leak the private token opening you up to security risk and vulnerability. Depending on what you are looking to do with your system, we can suggest using our auth-js package to handle any authentication you need. If you have any specifics on your needs, please let us know and we can lead you in the right direction. |
Thank you for your reply! Our app is not very complex at this time. We are running a React app over Next.js, deployed with Netlify. We are in the early stages of implementing our User system, and for the time being we aim to provide signup, login, logout, change password, forgot password for our internal users. We don't use the Okta signin widget, but our own React forms. We used |
Hey @carolina-cascade - You didn't say WHY you don't use the sign-in widget, which would be the first go-to. I suggest you contact our support team at developers@okta.com and describe your case in detail with them and they can steer you into what products would best satisfy your needs. As an alternative, you can examine the API calls documented at developers.okta.com to see which serve your needs. It wouldn't provide the convenience of some our SDK wrappers, but it may provide the customization you require. You can examine the API calls the sign-in widget makes in the repo (benefits of being open source!) here: https://github.com/okta/okta-signin-widget/blob/master/src/RegistrationController.js We are already reviewing any gaps in what auth-js provides, so details like this are helpful. Hope that helps! |
We're closing this ticket as the core request appears to either be "add signup/registration options to okta-auth-js" or "add client capability to okta-sdk-nodejs", and neither of those are on our current roadmap. Anyone running into obstacles are encouraged to contact our support team at developers@okta.com with their use-cases. |
Hi, I am trying to use okta-sdk in an app running on Next.js. However, I am having trouble initializing the client:
produces
Issues about
fs
Next's repo (for example 7755, 9866) suggest adding:as the files read with
fs
will only be available on server side, not during client rendering.This solution fails because of the calls:
According to the docs, when creating a new client, a file
okta.yaml
is searched in local directories before searching for environment variables or properties directly passed to the constructor. Is there a way to bypass the searching for files?Thank you!
The text was updated successfully, but these errors were encountered: