From 4349a4b5846dc02e73667e65dfa00ff58d87b3db Mon Sep 17 00:00:00 2001 From: Frederik Prijck Date: Mon, 18 Sep 2023 15:28:10 +0200 Subject: [PATCH] Update references from master to main branch (#1133) --- .github/ISSUE_TEMPLATE/Bug Report.yml | 4 ++-- .github/ISSUE_TEMPLATE/Feature Request.yml | 4 ++-- .github/ISSUE_TEMPLATE/config.yml | 2 +- .github/workflows/browserstack.yml | 4 ++-- .github/workflows/codeql.yml | 4 ++-- .github/workflows/semgrep.yml | 4 ++-- .github/workflows/snyk.yml | 4 ++-- .github/workflows/test.yml | 8 ++++---- CONTRIBUTING.md | 4 ++-- DEVELOPMENT.md | 2 +- FAQ.md | 3 ++- Jenkinsfile | 2 +- README.md | 10 +++++----- docs/index.html | 10 +++++----- src/utils.ts | 2 +- static/auth0-spa-js.development_old.js | 2 +- 16 files changed, 35 insertions(+), 34 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/Bug Report.yml b/.github/ISSUE_TEMPLATE/Bug Report.yml index ac7b1f59e..1ee1a78ea 100644 --- a/.github/ISSUE_TEMPLATE/Bug Report.yml +++ b/.github/ISSUE_TEMPLATE/Bug Report.yml @@ -1,6 +1,6 @@ name: 🐞 Report a bug description: Have you found a bug or issue? Create a bug report for this library -labels: ["bug"] +labels: ['bug'] body: - type: markdown @@ -15,7 +15,7 @@ body: options: - label: The issue can be reproduced in the [auth0-spa-js sample app](https://github.com/auth0-samples/auth0-javascript-samples/tree/master/01-Login) (or N/A). required: true - - label: I have looked into the [Readme](https://github.com/auth0/auth0-spa-js#readme), [Examples](https://github.com/auth0/auth0-spa-js/blob/master/EXAMPLES.md), and [FAQ](https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md) and have not found a suitable solution or answer. + - label: I have looked into the [Readme](https://github.com/auth0/auth0-spa-js#readme), [Examples](https://github.com/auth0/auth0-spa-js/blob/main/EXAMPLES.md), and [FAQ](https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md) and have not found a suitable solution or answer. required: true - label: I have looked into the [documentation](https://auth0.com/docs/libraries/auth0-single-page-app-sdk) and [API documentation](https://auth0.github.io/auth0-spa-js/), and have not found a suitable solution or answer. required: true diff --git a/.github/ISSUE_TEMPLATE/Feature Request.yml b/.github/ISSUE_TEMPLATE/Feature Request.yml index 1105655f6..1630d5903 100644 --- a/.github/ISSUE_TEMPLATE/Feature Request.yml +++ b/.github/ISSUE_TEMPLATE/Feature Request.yml @@ -1,6 +1,6 @@ name: 🧩 Feature request description: Suggest an idea or a feature for this library -labels: ["feature request"] +labels: ['feature request'] body: - type: checkboxes @@ -8,7 +8,7 @@ body: attributes: label: Checklist options: - - label: I have looked into the [Readme](https://github.com/auth0/auth0-spa-js#readme), [Examples](https://github.com/auth0/auth0-spa-js/blob/master/EXAMPLES.md), and [FAQ](https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md) and have not found a suitable solution or answer. + - label: I have looked into the [Readme](https://github.com/auth0/auth0-spa-js#readme), [Examples](https://github.com/auth0/auth0-spa-js/blob/main/EXAMPLES.md), and [FAQ](https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md) and have not found a suitable solution or answer. required: true - label: I have looked into the [documentation](https://auth0.com/docs/libraries/auth0-single-page-app-sdk) and [API documentation](https://auth0.github.io/auth0-spa-js/), and have not found a suitable solution or answer. required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 9c3dd307a..ec094f12e 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -4,7 +4,7 @@ contact_links: url: https://community.auth0.com about: Discuss this SDK in the Auth0 Community forums - name: FAQ - url: https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md + url: https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md about: Read the FAQ to get answers to common issues - name: SDK API Documentation url: https://auth0.github.io/auth0-spa-js/ diff --git a/.github/workflows/browserstack.yml b/.github/workflows/browserstack.yml index 7e7a770a0..ab1a73ccd 100644 --- a/.github/workflows/browserstack.yml +++ b/.github/workflows/browserstack.yml @@ -9,14 +9,14 @@ on: - synchronize push: branches: - - master + - main permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: NODE_VERSION: 18 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 256e723f4..2648c3461 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -8,7 +8,7 @@ on: - synchronize push: branches: - - master + - main - beta - v* schedule: @@ -21,7 +21,7 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: analyze: diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index fc7d2eeb7..a3aace780 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -8,7 +8,7 @@ on: - synchronize push: branches: - - master + - main schedule: - cron: '30 0 1,15 * *' @@ -17,7 +17,7 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: authorize: diff --git a/.github/workflows/snyk.yml b/.github/workflows/snyk.yml index 4b27ea3d4..8ad5b37ca 100644 --- a/.github/workflows/snyk.yml +++ b/.github/workflows/snyk.yml @@ -9,7 +9,7 @@ on: - synchronize push: branches: - - master + - main schedule: - cron: '30 0 1,15 * *' @@ -18,7 +18,7 @@ permissions: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} jobs: authorize: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fef95836a..71ce637ce 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,17 +5,17 @@ on: workflow_dispatch: pull_request: branches: - - master + - main push: branches: - - master + - main permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} env: NODE_VERSION: 18 @@ -73,7 +73,7 @@ jobs: - name: Run tests run: npm run test -- --maxWorkers=2 - + - name: Upload coverage uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # pin@3.1.4 gatsby: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9a9feb46b..7a11ac3b0 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -24,8 +24,8 @@ Please read [Auth0's contribution guidelines](https://github.com/auth0/open-sour ### Adding tests -- Unit tests go inside [\_\_tests\_\_](https://github.com/auth0/auth0-spa-js/tree/master/__tests__) -- Integration tests go inside [cypress/integration](https://github.com/auth0/auth0-spa-js/tree/master/cypress/integration) +- Unit tests go inside [\_\_tests\_\_](https://github.com/auth0/auth0-spa-js/tree/main/__tests__) +- Integration tests go inside [cypress/integration](https://github.com/auth0/auth0-spa-js/tree/main/cypress/integration) ### Running tests diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index 6b3d7b66b..49ff0894d 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -89,4 +89,4 @@ You may specify a different port for the development server by specifying the `D DEV_PORT=8080 npm start ``` -The Playground may not cover all use cases. In this case, modify the [index.html file](https://github.com/auth0/auth0-spa-js/blob/master/static/index.html) to configure the SDK as desired to invoke different behaviors. +The Playground may not cover all use cases. In this case, modify the [index.html file](https://github.com/auth0/auth0-spa-js/blob/main/static/index.html) to configure the SDK as desired to invoke different behaviors. diff --git a/FAQ.md b/FAQ.md index c029b8bb9..7dca928ef 100644 --- a/FAQ.md +++ b/FAQ.md @@ -80,9 +80,10 @@ If you're running your application from a secure origin, it's possible that your ## Why am I getting a `missing_refresh_token` error after upgrading to v2? -v1 of the SDK used an iframe as a backup if no refresh token was available. You could control this behaviour with the `useRefreshTokensFallback` option, which was `true` by default. With v2, we have flipped the default for `useRefreshTokensFallback` to `false` (see [the migration guide](https://github.com/auth0/auth0-spa-js/blob/master/MIGRATION_GUIDE.md#no-more-iframe-fallback-by-default-when-using-refresh-tokens)). As a result, you may encounter `missing_refresh_token` errors. +v1 of the SDK used an iframe as a backup if no refresh token was available. You could control this behaviour with the `useRefreshTokensFallback` option, which was `true` by default. With v2, we have flipped the default for `useRefreshTokensFallback` to `false` (see [the migration guide](https://github.com/auth0/auth0-spa-js/blob/main/MIGRATION_GUIDE.md#no-more-iframe-fallback-by-default-when-using-refresh-tokens)). As a result, you may encounter `missing_refresh_token` errors. To mitigate this, use one of the following solutions: + - Handle the error, and log the user in again using `loginWithRedirect` or `loginWithPopup`. - Revert to the v1 behaviour by setting `useRefreshTokenFallback` to `true`. diff --git a/Jenkinsfile b/Jenkinsfile index 644317dde..410fe5a3e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -45,7 +45,7 @@ pipeline { when { anyOf { branch 'beta' - branch 'master' + branch 'main' } } steps { diff --git a/README.md b/README.md index 452fefafa..225268a59 100644 --- a/README.md +++ b/README.md @@ -12,8 +12,8 @@ - [Quickstart](https://auth0.com/docs/quickstart/spa/vanillajs/interactive) - our interactive guide for quickly adding login, logout and user information to your app using Auth0. - [Sample app](https://github.com/auth0-samples/auth0-javascript-samples/tree/master/01-Login) - a full-fledged sample app integrated with Auth0. -- [FAQs](https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md) - frequently asked questions about auth0-spa-js SDK. -- [Examples](https://github.com/auth0/auth0-spa-js/blob/master/EXAMPLES.md) - code samples for common scenarios. +- [FAQs](https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md) - frequently asked questions about auth0-spa-js SDK. +- [Examples](https://github.com/auth0/auth0-spa-js/blob/main/EXAMPLES.md) - code samples for common scenarios. - [Docs Site](https://auth0.com/docs) - explore our Docs site and learn more about Auth0. ## Getting Started @@ -113,7 +113,7 @@ window.addEventListener('load', async () => { }); ``` -For other comprehensive examples, see the [EXAMPLES.md](https://github.com/auth0/auth0-spa-js/blob/master/EXAMPLES.md) document. +For other comprehensive examples, see the [EXAMPLES.md](https://github.com/auth0/auth0-spa-js/blob/main/EXAMPLES.md) document. ## API Reference @@ -132,7 +132,7 @@ We appreciate feedback and contribution to this repo! Before you get started, pl - [Auth0's general contribution guidelines](https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md) - [Auth0's code of conduct guidelines](https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md) -- [This repo's contribution guide](https://github.com/auth0/auth0-spa-js/blob/master/CONTRIBUTING.md) +- [This repo's contribution guide](https://github.com/auth0/auth0-spa-js/blob/main/CONTRIBUTING.md) ### Raise an issue @@ -155,5 +155,5 @@ Please do not report security vulnerabilities on the public GitHub issue tracker Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?

- This project is licensed under the MIT license. See the LICENSE file for more info. + This project is licensed under the MIT license. See the LICENSE file for more info.

diff --git a/docs/index.html b/docs/index.html index bd3434c07..d50f39e29 100644 --- a/docs/index.html +++ b/docs/index.html @@ -26,8 +26,8 @@

Documentation

@@ -84,7 +84,7 @@

Logging In

//redirect to the Universal Login Page
document.getElementById('login').addEventListener('click', async () => {
await auth0.loginWithRedirect();
});

//in your callback route (<MY_CALLBACK_URL>)
window.addEventListener('load', async () => {
const redirectResult = await auth0.handleRedirectCallback();
//logged in. you can get the user profile like this:
const user = await auth0.getUser();
console.log(user);
});
-

For other comprehensive examples, see the EXAMPLES.md document.

+

For other comprehensive examples, see the EXAMPLES.md document.

API Reference

@@ -110,7 +110,7 @@

Contributing

@@ -137,7 +137,7 @@

What is Auth0?

Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout
Why Auth0?

- This project is licensed under the MIT license. See the LICENSE file for more info. + This project is licensed under the MIT license. See the LICENSE file for more info.