Compare commits

...

4 Commits

Author SHA1 Message Date
GitHub Actions
aad0b8db0e chore(release): bump package version(s) [skip ci] 2022-12-23 06:16:36 +00:00
Balázs Orbán
137bbb8d84 fix(core): improve AuthConfig docs 2022-12-23 07:02:50 +01:00
Balázs Orbán
d7fbd05eba chore: update monorepo-release package 2022-12-23 06:52:57 +01:00
Balázs Orbán
532aa24495 chore: use classic PAT for now 2022-12-23 05:10:27 +01:00
7 changed files with 26 additions and 82 deletions

View File

@@ -50,6 +50,7 @@ jobs:
uses: actions/checkout@v3 uses: actions/checkout@v3
with: with:
fetch-depth: 0 fetch-depth: 0
token: ${{ secrets.GH_PAT_CLASSIC }}
- name: Install pnpm - name: Install pnpm
uses: pnpm/action-setup@v2.2.4 uses: pnpm/action-setup@v2.2.4
with: with:
@@ -64,9 +65,10 @@ jobs:
- name: Publish to npm and GitHub - name: Publish to npm and GitHub
run: pnpm release run: pnpm release
env: env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }} # Use GH_PAT when this is fixed:
# https://github.com/github/roadmap/issues/622
GITHUB_TOKEN: ${{ secrets.GH_PAT_CLASSIC }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NO_VERIFY: 1
release-pr: release-pr:
name: Publish PR name: Publish PR
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@@ -20,7 +20,7 @@
}, },
"devDependencies": { "devDependencies": {
"@actions/core": "^1.6.0", "@actions/core": "^1.6.0",
"@balazsorban/monorepo-release": "0.1.1", "@balazsorban/monorepo-release": "0.1.7",
"@types/jest": "^28.1.3", "@types/jest": "^28.1.3",
"@types/node": "^17.0.25", "@types/node": "^17.0.25",
"@typescript-eslint/eslint-plugin": "^5.10.2", "@typescript-eslint/eslint-plugin": "^5.10.2",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/core", "name": "@auth/core",
"version": "0.2.0", "version": "0.2.1",
"description": "Authentication for the web.", "description": "Authentication for the web.",
"homepage": "https://authjs.dev", "homepage": "https://authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth.git", "repository": "https://github.com/nextauthjs/next-auth.git",

View File

@@ -158,7 +158,6 @@ export async function Auth(
* *
* const request = new Request("https://example.com") * const request = new Request("https://example.com")
* const resposne = await AuthHandler(request, authConfig) * const resposne = await AuthHandler(request, authConfig)
*
* ``` * ```
* *
* @see [Initiailzation](https://authjs.dev/reference/configuration/auth-options) * @see [Initiailzation](https://authjs.dev/reference/configuration/auth-options)
@@ -168,10 +167,8 @@ export interface AuthConfig {
* List of authentication providers for signing in * List of authentication providers for signing in
* (e.g. Google, Facebook, Twitter, GitHub, Email, etc) in any order. * (e.g. Google, Facebook, Twitter, GitHub, Email, etc) in any order.
* This can be one of the built-in providers or an object with a custom provider. * This can be one of the built-in providers or an object with a custom provider.
* * **Default value**: `[]`
* * **Required**: *Yes*
* *
* [Documentation](https://next-auth.js.org/configuration/options#providers) | [Providers documentation](https://next-auth.js.org/configuration/providers) * @default []
*/ */
providers: Provider[] providers: Provider[]
/** /**
@@ -181,36 +178,23 @@ export interface AuthConfig {
* *
* On Unix systems: `openssl rand -hex 32` * On Unix systems: `openssl rand -hex 32`
* Or go to https://generate-secret.vercel.app/32 * Or go to https://generate-secret.vercel.app/32
*
* @default process.env.AUTH_SECRET ?? process.env.NEXTAUTH_SECRET
*
* [Documentation](https://next-auth.js.org/configuration/options#secret)
*/ */
secret?: string secret?: string
/** /**
* Configure your session like if you want to use JWT or a database, * Configure your session like if you want to use JWT or a database,
* how long until an idle session expires, or to throttle write operations in case you are using a database. * how long until an idle session expires, or to throttle write operations in case you are using a database.
* * **Default value**: See the documentation page
* * **Required**: No
*
* [Documentation](https://next-auth.js.org/configuration/options#session)
*/ */
session?: Partial<SessionOptions> session?: Partial<SessionOptions>
/** /**
* JSON Web Tokens are enabled by default if you have not specified an adapter. * JSON Web Tokens are enabled by default if you have not specified an {@link AuthConfig.adapter}.
* JSON Web Tokens are encrypted (JWE) by default. We recommend you keep this behaviour. * JSON Web Tokens are encrypted (JWE) by default. We recommend you keep this behaviour.
* * **Default value**: See the documentation page
* * **Required**: *No*
*
* [Documentation](https://next-auth.js.org/configuration/options#jwt)
*/ */
jwt?: Partial<JWTOptions> jwt?: Partial<JWTOptions>
/** /**
* Specify URLs to be used if you want to create custom sign in, sign out and error pages. * Specify URLs to be used if you want to create custom sign in, sign out and error pages.
* Pages specified will override the corresponding built-in page. * Pages specified will override the corresponding built-in page.
* * **Default value**: `{}`
* * **Required**: *No*
* *
* @default {}
* @example * @example
* *
* ```ts * ```ts
@@ -222,18 +206,12 @@ export interface AuthConfig {
* newUser: '/auth/new-user' * newUser: '/auth/new-user'
* } * }
* ``` * ```
*
* [Documentation](https://next-auth.js.org/configuration/options#pages) | [Pages documentation](https://next-auth.js.org/configuration/pages)
*/ */
pages?: Partial<PagesOptions> pages?: Partial<PagesOptions>
/** /**
* Callbacks are asynchronous functions you can use to control what happens when an action is performed. * Callbacks are asynchronous functions you can use to control what happens when an action is performed.
* Callbacks are *extremely powerful*, especially in scenarios involving JSON Web Tokens * Callbacks are *extremely powerful*, especially in scenarios involving JSON Web Tokens
* as they **allow you to implement access controls without a database** and to **integrate with external databases or APIs**. * as they **allow you to implement access controls without a database** and to **integrate with external databases or APIs**.
* * **Default value**: See the Callbacks documentation
* * **Required**: *No*
*
* [Documentation](https://next-auth.js.org/configuration/options#callbacks) | [Callbacks documentation](https://next-auth.js.org/configuration/callbacks)
*/ */
callbacks?: Partial<CallbacksOptions> callbacks?: Partial<CallbacksOptions>
/** /**
@@ -243,36 +221,23 @@ export interface AuthConfig {
* (e.g. OAuth or Email authentication flow, JWT or database sessions, etc), * (e.g. OAuth or Email authentication flow, JWT or database sessions, etc),
* but typically contains a user object and/or contents of the JSON Web Token * but typically contains a user object and/or contents of the JSON Web Token
* and other information relevant to the event. * and other information relevant to the event.
* * **Default value**: `{}`
* * **Required**: *No*
* *
* [Documentation](https://next-auth.js.org/configuration/options#events) | [Events documentation](https://next-auth.js.org/configuration/events) * @default {}
*/ */
events?: Partial<EventCallbacks> events?: Partial<EventCallbacks>
/** /** You can use the adapter option to pass in your database adapter. */
* You can use the adapter option to pass in your database adapter.
*
* * **Required**: *No*
*
* [Documentation](https://next-auth.js.org/configuration/options#adapter) |
* [Adapters Overview](https://next-auth.js.org/adapters/overview)
*/
adapter?: Adapter adapter?: Adapter
/** /**
* Set debug to true to enable debug messages for authentication and database operations. * Set debug to true to enable debug messages for authentication and database operations.
* * **Default value**: `false`
* * **Required**: *No*
* *
* - ⚠ If you added a custom `logger`, this setting is ignored. * - ⚠ If you added a custom {@link AuthConfig.logger}, this setting is ignored.
* *
* [Documentation](https://next-auth.js.org/configuration/options#debug) | [Logger documentation](https://next-auth.js.org/configuration/options#logger) * @default false
*/ */
debug?: boolean debug?: boolean
/** /**
* Override any of the logger levels (`undefined` levels will use the built-in logger), * Override any of the logger levels (`undefined` levels will use the built-in logger),
* and intercept logs in NextAuth. You can use this option to send NextAuth logs to a third-party logging service. * and intercept logs in NextAuth. You can use this option to send NextAuth logs to a third-party logging service.
* * **Default value**: `console`
* * **Required**: *No*
* *
* @example * @example
* *
@@ -294,36 +259,24 @@ export interface AuthConfig {
* }) * })
* ``` * ```
* *
* - ⚠ When set, the `debug` option is ignored * - ⚠ When set, the {@link AuthConfig.debug} option is ignored
* *
* [Documentation](https://next-auth.js.org/configuration/options#logger) | * @default console
* [Debug documentation](https://next-auth.js.org/configuration/options#debug)
*/ */
logger?: Partial<LoggerInstance> logger?: Partial<LoggerInstance>
/** /** Changes the theme of built-in {@link AuthConfig.pages}. */
* Changes the theme of pages.
* Set to `"light"` if you want to force pages to always be light.
* Set to `"dark"` if you want to force pages to always be dark.
* Set to `"auto"`, (or leave this option out)if you want the pages to follow the preferred system theme.
* * **Default value**: `"auto"`
* * **Required**: *No*
*
* [Documentation](https://next-auth.js.org/configuration/options#theme) | [Pages documentation]("https://next-auth.js.org/configuration/pages")
*/
theme?: Theme theme?: Theme
/** /**
* When set to `true` then all cookies set by NextAuth.js will only be accessible from HTTPS URLs. * When set to `true` then all cookies set by NextAuth.js will only be accessible from HTTPS URLs.
* This option defaults to `false` on URLs that start with `http://` (e.g. http://localhost:3000) for developer convenience. * This option defaults to `false` on URLs that start with `http://` (e.g. http://localhost:3000) for developer convenience.
* You can manually set this option to `false` to disable this security feature and allow cookies * You can manually set this option to `false` to disable this security feature and allow cookies
* to be accessible from non-secured URLs (this is not recommended). * to be accessible from non-secured URLs (this is not recommended).
* * **Default value**: `true` for HTTPS and `false` for HTTP sites
* * **Required**: No
*
* [Documentation](https://next-auth.js.org/configuration/options#usesecurecookies)
* *
* - ⚠ **This is an advanced option.** Advanced options are passed the same way as basic options, * - ⚠ **This is an advanced option.** Advanced options are passed the same way as basic options,
* but **may have complex implications** or side effects. * but **may have complex implications** or side effects.
* You should **try to avoid using advanced options** unless you are very comfortable using them. * You should **try to avoid using advanced options** unless you are very comfortable using them.
*
* The default is `false` HTTP and `true` for HTTPS sites.
*/ */
useSecureCookies?: boolean useSecureCookies?: boolean
/** /**
@@ -333,25 +286,14 @@ export interface AuthConfig {
* If you use this feature, you will likely want to create conditional behavior * If you use this feature, you will likely want to create conditional behavior
* to support setting different cookies policies in development and production builds, * to support setting different cookies policies in development and production builds,
* as you will be opting out of the built-in dynamic policy. * as you will be opting out of the built-in dynamic policy.
* * **Default value**: `{}`
* * **Required**: No
* *
* - ⚠ **This is an advanced option.** Advanced options are passed the same way as basic options, * - ⚠ **This is an advanced option.** Advanced options are passed the same way as basic options,
* but **may have complex implications** or side effects. * but **may have complex implications** or side effects.
* You should **try to avoid using advanced options** unless you are very comfortable using them. * You should **try to avoid using advanced options** unless you are very comfortable using them.
* *
* [Documentation](https://next-auth.js.org/configuration/options#cookies) | [Usage example](https://next-auth.js.org/configuration/options#example) * @default {}
*/ */
cookies?: Partial<CookiesOptions> cookies?: Partial<CookiesOptions>
/** /** @todo */
* If set to `true`, NextAuth.js will use either the `x-forwarded-host` or `host` headers,
* instead of `NEXTAUTH_URL`
* Make sure that reading `x-forwarded-host` on your hosting platform can be trusted.
* - ⚠ **This is an advanced option.** Advanced options are passed the same way as basic options,
* but **may have complex implications** or side effects.
* You should **try to avoid using advanced options** unless you are very comfortable using them.
*
* @default Boolean(process.env.NEXTAUTH_URL ?? process.env.AUTH_TRUST_HOST ?? process.env.VERCEL)
*/
trustHost?: boolean trustHost?: boolean
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@auth/sveltekit", "name": "@auth/sveltekit",
"version": "0.1.7", "version": "0.1.8",
"description": "Authentication for SvelteKit.", "description": "Authentication for SvelteKit.",
"homepage": "https://sveltekit.authjs.dev", "homepage": "https://sveltekit.authjs.dev",
"repository": "https://github.com/nextauthjs/next-auth.git", "repository": "https://github.com/nextauthjs/next-auth.git",

8
pnpm-lock.yaml generated
View File

@@ -13,7 +13,7 @@ importers:
.: .:
specifiers: specifiers:
'@actions/core': ^1.6.0 '@actions/core': ^1.6.0
'@balazsorban/monorepo-release': 0.1.1 '@balazsorban/monorepo-release': 0.1.7
'@types/jest': ^28.1.3 '@types/jest': ^28.1.3
'@types/node': ^17.0.25 '@types/node': ^17.0.25
'@typescript-eslint/eslint-plugin': ^5.10.2 '@typescript-eslint/eslint-plugin': ^5.10.2
@@ -38,7 +38,7 @@ importers:
typescript: 4.8.4 typescript: 4.8.4
devDependencies: devDependencies:
'@actions/core': 1.9.0 '@actions/core': 1.9.0
'@balazsorban/monorepo-release': 0.1.1 '@balazsorban/monorepo-release': 0.1.7
'@types/jest': 28.1.3 '@types/jest': 28.1.3
'@types/node': 17.0.45 '@types/node': 17.0.45
'@typescript-eslint/eslint-plugin': 5.29.0_k4l66av2tbo6kxzw52jzgbfzii '@typescript-eslint/eslint-plugin': 5.29.0_k4l66av2tbo6kxzw52jzgbfzii
@@ -5416,8 +5416,8 @@ packages:
'@babel/helper-validator-identifier': 7.19.1 '@babel/helper-validator-identifier': 7.19.1
to-fast-properties: 2.0.0 to-fast-properties: 2.0.0
/@balazsorban/monorepo-release/0.1.1: /@balazsorban/monorepo-release/0.1.7:
resolution: {integrity: sha512-fzloVznwo4OoBpeY57gh6QetvAflkDyys4wbERz3gtxBhGf1QyIwNFj2QuCxe4DL/T1luDxJocC+zAlZ00JGWQ==} resolution: {integrity: sha512-B+6JeY4ZPrVbocAi+6oJ1j2eanUN0KHrOf3FAzCJzKFVC+xCudIbMbzji3UulikOyeFmmmt/If+/yOmzXS+AEQ==}
engines: {node: '>=16.16.0'} engines: {node: '>=16.16.0'}
hasBin: true hasBin: true
dependencies: dependencies: