Skip to content

Commit e86562a

Browse files
committed
Update user management sdk calls
1 parent af4a174 commit e86562a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/app/callback/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export async function GET(request: NextRequest) {
88
if (code) {
99
try {
1010
// Use the code returned to us by AuthKit and authenticate the user with WorkOS
11-
const { user } = await workos.users.authenticateWithCode({
11+
const { user } = await workos.userManagement.authenticateWithCode({
1212
clientId: getClientId(),
1313
code,
1414
});

src/auth.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ export function getClientId() {
1717
}
1818

1919
export async function getAuthorizationUrl() {
20-
const authorizationUrl = workos.sso.getAuthorizationURL({
20+
const authorizationUrl = workos.userManagement.getAuthorizationURL({
2121
provider: "authkit",
22-
clientID: getClientId(),
22+
clientId: getClientId(),
2323
// The endpoint that WorkOS will redirect to after a user authenticates
24-
redirectURI: "http://localhost:3000/callback",
24+
redirectUri: "http://localhost:3000/callback",
2525
});
2626

2727
return authorizationUrl;

0 commit comments

Comments
 (0)