Jelajahi Sumber

fix(docs): Update auth docs with new ErrorResult API

Michael Bromley 5 tahun lalu
induk
melakukan
67ee94b204
1 mengubah file dengan 3 tambahan dan 3 penghapusan
  1. 3 3
      docs/content/docs/developer-guide/authentication.md

+ 3 - 3
docs/content/docs/developer-guide/authentication.md

@@ -50,7 +50,7 @@ function onSignIn(googleUser) {
         authenticate(input: {
         authenticate(input: {
           google: { token: $token }
           google: { token: $token }
         }) {
         }) {
-        user {
+        ...on CurrentUser {
             id
             id
             identifier
             identifier
         }
         }
@@ -170,7 +170,7 @@ vendureLoginButton.addEventListener('click', () => {
           token: $token
           token: $token
         }
         }
       }) {
       }) {
-        user { id }
+        ...on CurrentUser { id }
       }
       }
     }`,
     }`,
     { token: keycloak.token },
     { token: keycloak.token },
@@ -251,7 +251,7 @@ export class KeycloakAuthenticationStrategy implements AuthenticationStrategy<Ke
     if (!userInfo) {
     if (!userInfo) {
         return false;
         return false;
     }
     }
-    const user = await this.externalAuthenticationService.findAdministratorUser(this.name, userInfo.sub);
+    const user = await this.externalAuthenticationService.findAdministratorUser(ctx, this.name, userInfo.sub);
     if (user) {
     if (user) {
         return user;
         return user;
     }
     }