Skip to content
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

Build test SDK #35

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
18.18.1
2 changes: 1 addition & 1 deletion components/LoginDiscoveryForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const LoginDiscoveryForm = ({domain}: Props) => {
<>
<EmailLoginForm title="Sign in" onSubmit={discoveryStart}>
<p>
We&apos;ll email you a magic code for a password-free sign in.
We&apos;ll email you a magic code for a password free sign in.
<br />
You&apos;ll be able to choose which organization you want to access.
<br />
Expand Down
4 changes: 2 additions & 2 deletions lib/loadStytch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ export type SessionsAuthenticateResponse = Awaited<
ReturnType<typeof client.sessions.authenticate>
>;
export type SAMLConnection = Awaited<
ReturnType<typeof client.sso.saml.create>
ReturnType<typeof client.sso.saml.createConnection>
>["connection"];

export type OIDCConnection = Awaited<
ReturnType<typeof client.sso.oidc.create>
ReturnType<typeof client.sso.oidc.createConnection>
>["connection"];

export type DiscoveredOrganizations = Awaited<
Expand Down
3 changes: 1 addition & 2 deletions lib/orgService.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import loadStytch, { Member, Organization } from "./loadStytch";
import { SearchOperator } from "stytch";

const stytch = loadStytch();

Expand All @@ -20,7 +19,7 @@ export const findByID = async (organization_id: string): Promise<Organization |
export const findBySlug = async (slug: string): Promise<Organization | null> => {
const orgSearchPromise = stytch.organizations.search({
query: {
operator: SearchOperator.AND,
operator: "AND",
operands: [{ filter_name: "organization_slugs", filter_value: [slug] }],
},
});
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"next": "13.1.6",
"react": "18.2.0",
"react-dom": "18.2.0",
"stytch": "^7.5.1",
"stytch": "^10.5.0",
"typescript": "4.9.5"
},
"devDependencies": {
Expand Down
68 changes: 19 additions & 49 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading