zudoku 0.3.1-dev.12 → 0.3.1-dev.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zudoku",
3
- "version": "0.3.1-dev.12",
3
+ "version": "0.3.1-dev.13",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -178,7 +178,7 @@ export class OpenIDAuthenticationProvider implements AuthenticationProvider {
178
178
  authorizationUrl.searchParams.set("client_id", this.client.client_id);
179
179
  authorizationUrl.searchParams.set("redirect_uri", redirectUrl.toString());
180
180
  authorizationUrl.searchParams.set("response_type", "code");
181
- authorizationUrl.searchParams.set("scope", "openid profile");
181
+ authorizationUrl.searchParams.set("scope", "openid profile email");
182
182
  authorizationUrl.searchParams.set("code_challenge", codeChallenge);
183
183
  authorizationUrl.searchParams.set(
184
184
  "code_challenge_method",
@@ -45,6 +45,7 @@ const RecursiveMenu = ({ item }: { item: ProfileNavigationItem }) => {
45
45
  };
46
46
 
47
47
  export const Header = memo(function HeaderInner() {
48
+ const auth = useAuth();
48
49
  const [isDark, toggleTheme] = useTheme();
49
50
  const { isAuthenticated, profile, isAuthEnabled } = useAuth();
50
51
  const { pathname } = useLocation();
@@ -97,15 +98,8 @@ export const Header = memo(function HeaderInner() {
97
98
  <div className="items-center justify-self-end text-sm hidden lg:flex gap-2">
98
99
  <Slotlet name="head-navigation-start" />
99
100
  {isAuthEnabled && !isAuthenticated ? (
100
- <Button variant="ghost" asChild>
101
- <Link
102
- to={{
103
- pathname: "/signin",
104
- search: `?redirect=${encodeURIComponent(pathname)}`,
105
- }}
106
- >
107
- Login
108
- </Link>
101
+ <Button onClick={() => auth.login()} asChild>
102
+ Login
109
103
  </Button>
110
104
  ) : (
111
105
  accountItems.length > 0 && (