hello, i am currently using custom ui for kratos a...
# talk-kratos
c
hello, i am currently using custom ui for kratos and configured my settings accordingly on the ory console( changed all the endpoints to my own, example : /ui/login => http://localhost:3000/login) but I get this error when I try to login with google(image below), is there anything I have to configure or adjust to make it work? because when I use the default managed UI, the google login works fine. I don't quite understand the reason of this session error, btw my custom ui is from this nextjs template : https://github.com/ory/kratos-selfservice-ui-react-nextjs
p
Hi @cuddly-queen-58375 Are you using the Ory Tunnel locally?
c
hello sir, thank you for the reply, I dont quite understand what Ory Tunnel locally means sorry.. but I am indeed using the exact files in the api/.ory/[...paths].ts, i did not change anything in there yet, am i supposed to configure anything?
@proud-plumber-24205
p
I would suggest reading https://www.ory.sh/docs/getting-started/local-development#local-development So currently the SDK is pointing to your nextjs application instead of the project URL? e.g. nextjs is on localhost:3000 and the SDK is pointing to http://localhost:3000/.ory your project slug is used by the file linked above through an environment variable.
c
does this mean sdk pointing to project url? (my current setting), also thank you, i will look at the link you provided~
i think i will do more study on this, again, thanks for the replay
p
I also think this nextjs example is a bit difficult to get started with. It isn't as well maintained atm i think and also it includes a proxy inside of itself (nextjs hosts the proxy for you as well) which is a bit confusing. You can take a look at a more recent nextjs example using Ory elements https://github.com/ory/elements/tree/main/examples/nextjs-spa
c
thank you, will take a look at this also
h
@proud-plumber-24205 Hi, I am encountering this issue too. • Setup the Nextjs example and then add in GitHub social sign-in then encounter the same error code Is there any method to use the same code but develop it locally (Using tunnel? But how to setup the env variable for nextjs proxy to work correctly?) Thank for your time
Copy code
// After setting up tunnel

export default createApiHandler({
  fallbackToPlayground: true,
  apiBaseUrlOverride: "<http://localhost:4000>"
});
This doesn’t work~