Comments (3)
Okay taking a look
from hanko.
Hey @shricodev dynamic import importing the component when using it, fixes this issue. Have you tried that
import dynamic from 'next/dynamic';
const HankoAuth = dynamic(() => import('@/components/HankoAuth'), { ssr: false })
export default function LoginPage() {
return (
<HankoAuth />
);
}
You can also find it in the docs, it has been updated
https://docs.hanko.io/quickstarts/fullstack/next
from hanko.
@Ashutosh-Bhadauriya I have already tried dynamically importing the <Hanko-Auth>
component, but it did not work either. I have mentioned it here.
After going through the issues section in this repo, I found a closed issue that addressed this error. I tried dynamic importing the modules as shown #1020 (comment). This did not fix it either, or perhaps I missed something.
This is the code that renders <HankoAuth />
and <HankoProfile />
import dynamic from "next/dynamic";
// This is imported dynamically to get rid of a hanko bug.
// ReferenceError: CustomEvent is not defined
const HankoAuth = dynamic(() => import("@/components/HankoAuth/HankoAuth"), {
ssr: false,
});
export default function LoginPage() {
return (
<div className="flex min-h-screen items-center justify-center">
<HankoAuth />
</div>
);
}
import dynamic from "next/dynamic";
import type { ComponentType } from "react";
// These are imported dynamically to get rid of a hanko bug.
// ReferenceError: CustomEvent is not defined
const HankoProfile = dynamic(
() => import("@/components/HankoProfile/HankoProfile"),
{
ssr: false,
},
);
import LogoutButton from "@/components/HankoLogout/LogoutBotton";
type Props = {};
const Page: ComponentType<Props> = (props) => {
return (
<div className="mx-auto flex w-fit flex-col justify-center space-y-6 px-6">
<HankoProfile />
<LogoutButton />
</div>
);
};
export default Page;
PS: I have also tried dynamic importing the <HankoLogout />
component. It didn't work.
Could you please try checking in the existing codebase that might be throwing this error even when everything is done as mentioned? I may have missed something\
https://github.com/shricodev/pdfwhisper-openai
from hanko.
Related Issues (20)
- Add Scroll-to-Top Button for Improved User Experience HOT 1
- hanko-auth: Session expired error after logout / on reload HOT 1
- Release binaries for the backend CLI HOT 1
- Deleting a user as an admin is not handled gracefully for the user
- Passkey created during onboarding doesn't show up in profile
- Add deployment section in docs HOT 1
- New event for signup, as onAuthFlowCompleted triggers for both sign-up/in HOT 2
- Facing issue when integrating Hanko with Remix, as remix does not convert commonjs modules to esmodules automatically
- import users: JSON schema not accurate
- Docker image in Docker Hub
- Alignment of button content HOT 3
- backend: version cmd has empty output when using container
- ci: cli-publish workflow improvements
- Session cookie not set on localhost on safari
- Hanko cookie does not have SameSite attribute
- Improve logging on SAML endpoints
- userChanged event in <hanko-profile> HOT 1
- Add SAML config to database
- Can't build quickstart HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hanko.