From f36821b92998ce8e84a9b956862d7fdc7a995d19 Mon Sep 17 00:00:00 2001
From: Christoph Reiter <reiter.christoph@gmail.com>
Date: Thu, 20 Feb 2020 10:59:53 +0100
Subject: [PATCH] Also set the "locale" option for the keycloak login

With keycloak 9.0 the kcLocale option is gone and the locale selection has been reworked.
If I understand things correctly using the "locale" option should start working with 9.0,
so pass both for now.

See https://www.keycloak.org/docs/latest/server_admin/#_user_locale_selection

Fixes #8
---
 packages/auth/src/keycloak.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/packages/auth/src/keycloak.js b/packages/auth/src/keycloak.js
index cb55e563..866f4a16 100644
--- a/packages/auth/src/keycloak.js
+++ b/packages/auth/src/keycloak.js
@@ -146,7 +146,8 @@ export class KeycloakWrapper extends EventTarget {
 
         if (!this._keycloak.authenticated) {
             await this._keycloak.login({
-                kcLocale: language,
+                kcLocale: language,  // Keycloak < 9.0
+                locale: language,
             });
         }
     }
-- 
GitLab