-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
feat: add nextjs example and supporting libraries #240
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, but this triggered me during the presentation 😉
* project root. Assuming you have a file at `./app/my-login/page.tsx`, you would set this to | ||
* `/my-login`. | ||
*/ | ||
login_ui_path?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
login_ui_path?: string | |
loginUiPath?: string |
* project root. Assuming you have a file at `./app/my-registration/page.tsx`, you would set this to | ||
* `/my-registration`. | ||
*/ | ||
registration_ui_path?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
registration_ui_path?: string | |
registrationUiPath?: string |
* project root. Assuming you have a file at `./app/my-recovery/page.tsx`, you would set this to | ||
* `/my-recovery`. | ||
*/ | ||
recovery_ui_path?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
recovery_ui_path?: string | |
recoveryUiPath?: string |
* project root. Assuming you have a file at `./app/my-verification/page.tsx`, you would set this to | ||
* `/my-verification`. | ||
*/ | ||
verification_ui_path?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verification_ui_path?: string | |
verificationUiPath?: string |
* project root. Assuming you have a file at `./app/my-settings/page.tsx`, you would set this to | ||
* `/my-settings`. | ||
*/ | ||
settings_ui_path?: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
settings_ui_path?: string | |
settingsUiPath?: string |
🤣 |
@jonas-jonas why is it
and not
? |
I'm stuck trying to create the |
@@ -0,0 +1,6 @@ | |||
import { OryConfig } from "./types" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jonas-jonas basically this whole directory (examples/nextjs-app-router/nextjs) needs to be published as it's own @ory/nextjs
package.
The package should only export things that are exported in the index.ts
files
@@ -0,0 +1,7 @@ | |||
import { getLoginFlow } from "./login" | |||
|
|||
export { getLoginFlow } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is that @ory/nextjs/app
has only the exports available in this file
@@ -0,0 +1,3 @@ | |||
import { OryCardContent } from "@ory/elements-react" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should actually be `OryCardLayout
import { OryCardContent } from "@ory/elements-react" | |
import { OryCardLayout } from "@ory/elements-react" |
|
||
export function DefaultCardLayout({ children }: PropsWithChildren) { | ||
return ( | ||
<main className="p-4 pb-8 flex items-center justify-center flex-col gap-8 min-h-screen"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem kinda is that we have the card element, but no backdrop element, so the card just is on the top left of the screen. We should add a layout component or background component. Not sure where to put it, so i put it here. But it's kinda weird because we don't override it anywhere, we just import it (see nextjs app router example app)
This comment was marked as outdated.
This comment was marked as outdated.
f3020b1
to
079ab44
Compare
079ab44
to
8c3bc44
Compare
Related Issue or Design Document
Checklist
If this pull request addresses a security vulnerability,
I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
Further comments