Compare commits

..

7 Commits

Author SHA1 Message Date
Balázs Orbán
e71118b996 chore: bump versions 2022-04-20 19:07:54 +02:00
Balázs Orbán
afdb3c8d7c fix: more strict default callback url handling 2022-04-20 18:52:24 +02:00
Raúl Marín
fd755bc29e fix(signin): set email sign-in input to "email" & "required"(#4352)
* fix(core\pages\signin.tsx): set type of built-in email sign-in input to email for browse validation
* fix(core\pages\signin.tsx): add required attribute to built-in sign-in email input

Co-authored-by: Lluis Agusti <hi@llu.lu>
2022-04-15 19:12:01 +02:00
Yisu Kim
59daa0e43f fix(providers): add optional chaining to avoid nullish reference errors (#4365) 2022-04-14 16:35:54 +02:00
Simon Kirsten
58d06ed727 fix: Cleanup global __NEXTAUTH state after unmount (#4383) 2022-04-14 16:35:10 +02:00
Salah Eddine
82159d3e8f docs: remove auth from keycloack url (#4391)
in keycloak 17.0+ , There's a change in endpoints as per the official documentation (https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_users_resource) .
so the new url well be https://my-keycloak-domain.com/realms/My_Realm
2022-04-14 16:28:21 +02:00
Balázs Orbán
abb9fed7aa chore: bump versions 2022-04-14 11:09:32 +02:00
7 changed files with 16 additions and 9 deletions

View File

@@ -37,5 +37,5 @@ providers: [
```
:::note
`issuer` should include the realm  e.g. `https://my-keycloak-domain.com/auth/realms/My_Realm`
`issuer` should include the realm  e.g. `https://my-keycloak-domain.com/realms/My_Realm`
:::

View File

@@ -1,6 +1,6 @@
{
"name": "@next-auth/upstash-redis-adapter",
"version": "2.0.0",
"version": "3.0.0",
"description": "Upstash adapter for next-auth. It uses Upstash's connectionless (HTTP based) Redis client.",
"homepage": "https://next-auth.js.org",
"repository": "https://github.com/nextauthjs/adapters",
@@ -44,4 +44,4 @@
"jest": {
"preset": "adapter-test/jest"
}
}
}

View File

@@ -1,6 +1,6 @@
{
"name": "next-auth",
"version": "4.3.2",
"version": "4.3.3",
"description": "Authentication for Next.js",
"homepage": "https://next-auth.js.org",
"repository": "https://github.com/nextauthjs/next-auth.git",
@@ -132,4 +132,4 @@
"**/tests",
"**/__tests__"
]
}
}

View File

@@ -5,7 +5,7 @@ export const defaultCallbacks: CallbacksOptions = {
return true
},
redirect({ url, baseUrl }) {
if (url.startsWith("/")) return new URL(url, baseUrl).toString()
if (url.startsWith("/")) return `${baseUrl}${url}`
else if (new URL(url).origin === baseUrl) return url
return baseUrl
},

View File

@@ -123,10 +123,11 @@ export default function SigninPage(props: SignInServerPageParams) {
<input
id={`input-email-for-${provider.id}-provider`}
autoFocus
type="text"
type="email"
name="email"
value={email}
placeholder="email@example.com"
required
/>
<button type="submit">Sign in with {provider.name}</button>
</form>

View File

@@ -82,9 +82,9 @@ export default function Kakao<P extends Record<string, any> = KakaoProfile>(
profile(profile) {
return {
id: profile.id,
name: profile.kakao_account?.profile.nickname,
name: profile.kakao_account?.profile?.nickname,
email: profile.kakao_account?.email,
image: profile.kakao_account?.profile.profile_image_url,
image: profile.kakao_account?.profile?.profile_image_url,
}
},
options,

View File

@@ -359,6 +359,12 @@ export function SessionProvider(props: SessionProviderProps) {
}
__NEXTAUTH._getSession()
return () => {
__NEXTAUTH._lastSync = 0
__NEXTAUTH._session = undefined
__NEXTAUTH._getSession = () => {}
}
}, [])
React.useEffect(() => {