pugauth
September 17, 2019, 1:24am
1
Hi, I’m wondering if it’s possible to use Auth0 Lock in a Gatsby project? I have a Gatsby project and would like to implement “Signup” only without the “login” but am finding it not possible.
Any suggestions would be highly welcome.
Hey there!
Have you had a chance to look through our docs on Lock for Web?
pugauth
September 17, 2019, 11:13am
3
Thanks Konrad. We have and have tried to implement it but have been unsuccessful. Do you know if it is possible to implement Lock for Web on SSR projects (Gatsby)?
Gotchya! Not sure as I’m not a web guy but let me discuss it with my colleague and get back to you!
pugauth
September 17, 2019, 12:07pm
5
Awesome. Thanks Konrad! If you’ve got any suggestions, do let us know. We’re able to implement in a React app easily but SSR has been impossible for us to figure out.
Sure! Will get back to you as soon as I got any info back!
Hello Konrad,
Do you have any infos to share regarding web lock in SSR ?
Regards,
Nicolas
Not yet @NicolasR unfortunately bet let me reping the person I asked!
I was working on another topic regarding this. It looks like users are able to get it working here:
opened 11:11PM - 10 Jun 19 UTC
closed 05:14PM - 11 Jun 19 UTC
### Description
Using the current Auth0-js and Auth0-Lock packages, I was recei… ving an error in TransitionGroup.js that's being used from the Auth0-Lock dependency: react-transition-group ("react-transition-group": "^2.2.1").
My app is built in React (16.8.6) with Gatsby (2.3.31).
I fixed the issue so I no longer have the exact line of code, but basically "this.state.children" did not exist so TransitionGroup.js would cause an error which prevented the entire page from rendering.
### Environment
Please provide the following:
* Lock version: 11.16.2
* Browser version: Chrome 74.0.3729.169
* OS: Windows 10
* Additional extensions/libraries that might be affecting your instance:
### Reproduction
As this is a project that can't be viewed by the public yet, I can't link to my repo, but I was able to fix the problem by removing the 'react-transition-group' from the Auth0 dependencies. I used the same method for fixing the errors between React versions from the Auth0 dependencies:
"resolutions": {
"react": "^16.8.6",
"react-dom": "^16.8.6",
"react-transition-group": "^4.1.1"
}
Here is the topic I came from:
Thanks for adding your solution to the conversation. I know we currently have this blog post as a resource, but it does not show an implementation with the lock library, and that seems to be causing the issue. It looks like the thread you mentioned is a fix, and hopefully this topic will provide some more reference to that in the future.
Thanks again!
Dan