Socket
Socket
Sign inDemoInstall

@auth/sveltekit

Package Overview
Dependencies
Maintainers
2
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@auth/sveltekit - npm Package Compare versions

Comparing version 0.13.0 to 0.14.0

2

dist/components/SignIn.svelte.d.ts

@@ -7,3 +7,3 @@ import { SvelteComponentTyped } from "svelte";

className?: string | undefined;
provider: Parameters<typeof signIn>[0];
provider?: Partial<Parameters<typeof signIn>[0]>;
signInPage?: string | undefined;

@@ -10,0 +10,0 @@ options?: Parameters<typeof signIn>[1] | undefined;

@@ -14,3 +14,3 @@ import { SvelteComponentTyped } from "svelte";

slots: {
default: {};
submitButton: {};
};

@@ -17,0 +17,0 @@ };

@@ -23,3 +23,3 @@ /**

*
* export const { handle, signIn signOut } = SvelteKitAuth({
* export const { handle, signIn, signOut } = SvelteKitAuth({
* providers: [GitHub({ clientId: GITHUB_ID, clientSecret: GITHUB_SECRET })],

@@ -72,3 +72,3 @@ * })

* <h1>SvelteKit Auth Example</h1>
* <p>
* <div>
* {#if $page.data.session}

@@ -92,3 +92,3 @@ * {#if $page.data.session.user?.image}

* {/if}
* </p>
* </div>
* ```

@@ -103,5 +103,2 @@ *

* ```
* ```ts title="src/routes/signin/+page.svelte"
* <!-- empty file -->
* ```
* ```ts title="src/routes/signout/+page.server.ts"

@@ -112,7 +109,3 @@ * import { signOut } from "../../auth"

* ```
* ```ts title="src/routes/signout/+page.svelte"
* <!-- empty file -->
* ```
*
*
* ## Managing the session

@@ -160,3 +153,3 @@ *

* Not doing so can lead to users being able to incorrectly access protected information in the case the `+layout.server.ts` does not run for that page load.
* This code sample already implements the correct method by using `const { session } = await parent();`
* This code sample already implements the correct method by using `const { session } = await parent();`. For more information on SvelteKit's `load` functionality behaviour and its implications on authentication, see this [SvelteKit docs section](https://kit.svelte.dev/docs/load#implications-for-authentication).
* :::

@@ -163,0 +156,0 @@ *

@@ -23,3 +23,3 @@ /**

*
* export const { handle, signIn signOut } = SvelteKitAuth({
* export const { handle, signIn, signOut } = SvelteKitAuth({
* providers: [GitHub({ clientId: GITHUB_ID, clientSecret: GITHUB_SECRET })],

@@ -72,3 +72,3 @@ * })

* <h1>SvelteKit Auth Example</h1>
* <p>
* <div>
* {#if $page.data.session}

@@ -92,3 +92,3 @@ * {#if $page.data.session.user?.image}

* {/if}
* </p>
* </div>
* ```

@@ -103,5 +103,2 @@ *

* ```
* ```ts title="src/routes/signin/+page.svelte"
* <!-- empty file -->
* ```
* ```ts title="src/routes/signout/+page.server.ts"

@@ -112,7 +109,3 @@ * import { signOut } from "../../auth"

* ```
* ```ts title="src/routes/signout/+page.svelte"
* <!-- empty file -->
* ```
*
*
* ## Managing the session

@@ -160,3 +153,3 @@ *

* Not doing so can lead to users being able to incorrectly access protected information in the case the `+layout.server.ts` does not run for that page load.
* This code sample already implements the correct method by using `const { session } = await parent();`
* This code sample already implements the correct method by using `const { session } = await parent();`. For more information on SvelteKit's `load` functionality behaviour and its implications on authentication, see this [SvelteKit docs section](https://kit.svelte.dev/docs/load#implications-for-authentication).
* :::

@@ -163,0 +156,0 @@ *

{
"name": "@auth/sveltekit",
"version": "0.13.0",
"version": "0.14.0",
"description": "Authentication for SvelteKit.",

@@ -37,3 +37,3 @@ "keywords": [

"set-cookie-parser": "^2.6.0",
"@auth/core": "0.27.0"
"@auth/core": "0.28.0"
},

@@ -83,4 +83,4 @@ "peerDependencies": {

"providers": "node ../utils/scripts/providers.js --out src/lib",
"test": "vitest -c ../utils/vitest.config.ts"
"test": "vitest run -c ../utils/vitest.config.ts"
}
}

@@ -16,5 +16,5 @@ /**

* ## Usage
*
*
* ```ts title="src/auth.ts"
*
*
* import { SvelteKitAuth } from "@auth/sveltekit"

@@ -24,7 +24,7 @@ * import GitHub from "@auth/sveltekit/providers/github"

*
* export const { handle, signIn signOut } = SvelteKitAuth({
* export const { handle, signIn, signOut } = SvelteKitAuth({
* providers: [GitHub({ clientId: GITHUB_ID, clientSecret: GITHUB_SECRET })],
* })
* ```
*
*
* or to use SvelteKit platform environment variables for platforms like Cloudflare

@@ -73,3 +73,3 @@ *

* <h1>SvelteKit Auth Example</h1>
* <p>
* <div>
* {#if $page.data.session}

@@ -93,5 +93,5 @@ * {#if $page.data.session.user?.image}

* {/if}
* </p>
* </div>
* ```
*
*
* `<SignIn />` and `<SignOut />` are components that `@auth/sveltekit` provides out of the box - they handle the sign-in/signout flow, and can be used as-is as a starting point or customized for your own components.

@@ -104,5 +104,2 @@ * To set up the form actions, we need to define the files in `src/routes`:

* ```
* ```ts title="src/routes/signin/+page.svelte"
* <!-- empty file -->
* ```
* ```ts title="src/routes/signout/+page.server.ts"

@@ -113,6 +110,2 @@ * import { signOut } from "../../auth"

* ```
* ```ts title="src/routes/signout/+page.svelte"
* <!-- empty file -->
* ```
*
*

@@ -161,3 +154,3 @@ * ## Managing the session

* Not doing so can lead to users being able to incorrectly access protected information in the case the `+layout.server.ts` does not run for that page load.
* This code sample already implements the correct method by using `const { session } = await parent();`
* This code sample already implements the correct method by using `const { session } = await parent();`. For more information on SvelteKit's `load` functionality behaviour and its implications on authentication, see this [SvelteKit docs section](https://kit.svelte.dev/docs/load#implications-for-authentication).
* :::

@@ -164,0 +157,0 @@ *

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc