Skip to content

Commit

Permalink
Update references from master to main branch (#1133)
Browse files Browse the repository at this point in the history
  • Loading branch information
frederikprijck authored Sep 18, 2023
1 parent 2ac288b commit 4349a4b
Show file tree
Hide file tree
Showing 16 changed files with 35 additions and 34 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/Bug Report.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/Feature Request.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: 🧩 Feature request
description: Suggest an idea or a feature for this library
labels: ["feature request"]
labels: ['feature request']

body:
- type: checkboxes
id: checklist
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
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/browserstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- synchronize
push:
branches:
- master
- main
- beta
- v*
schedule:
Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- synchronize
push:
branches:
- master
- main
schedule:
- cron: '30 0 1,15 * *'

Expand All @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/snyk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- synchronize
push:
branches:
- master
- main
schedule:
- cron: '30 0 1,15 * *'

Expand All @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 2 additions & 1 deletion FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ pipeline {
when {
anyOf {
branch 'beta'
branch 'master'
branch 'main'
}
}
steps {
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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 <a href="https://auth0.com/why-auth0">Why Auth0?</a>
</p>
<p align="center">
This project is licensed under the MIT license. See the <a href="https://github.com/auth0/auth0-spa-js/blob/master/LICENSE"> LICENSE</a> file for more info.
This project is licensed under the MIT license. See the <a href="https://github.com/auth0/auth0-spa-js/blob/main/LICENSE"> LICENSE</a> file for more info.
</p>
10 changes: 5 additions & 5 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ <h2>Documentation</h2>
<ul>
<li><a href="https://auth0.com/docs/quickstart/spa/vanillajs/interactive">Quickstart</a> - our interactive guide for quickly adding login, logout and user information to your app using Auth0.</li>
<li><a href="https://github.com/auth0-samples/auth0-javascript-samples/tree/master/01-Login">Sample app</a> - a full-fledged sample app integrated with Auth0.</li>
<li><a href="https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md">FAQs</a> - frequently asked questions about auth0-spa-js SDK.</li>
<li><a href="https://github.com/auth0/auth0-spa-js/blob/master/EXAMPLES.md">Examples</a> - code samples for common scenarios.</li>
<li><a href="https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md">FAQs</a> - frequently asked questions about auth0-spa-js SDK.</li>
<li><a href="https://github.com/auth0/auth0-spa-js/blob/main/EXAMPLES.md">Examples</a> - code samples for common scenarios.</li>
<li><a href="https://auth0.com/docs">Docs Site</a> - explore our Docs site and learn more about Auth0.</li>
</ul>

Expand Down Expand Up @@ -84,7 +84,7 @@ <h3>Logging In</h3>
</code></pre>
<pre><code class="language-js"><span class="hl-9">//redirect to the Universal Login Page</span><br/><span class="hl-7">document</span><span class="hl-0">.</span><span class="hl-12">getElementById</span><span class="hl-0">(</span><span class="hl-8">&#39;login&#39;</span><span class="hl-0">).</span><span class="hl-12">addEventListener</span><span class="hl-0">(</span><span class="hl-8">&#39;click&#39;</span><span class="hl-0">, </span><span class="hl-10">async</span><span class="hl-0"> () </span><span class="hl-10">=&gt;</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-6">await</span><span class="hl-0"> </span><span class="hl-7">auth0</span><span class="hl-0">.</span><span class="hl-12">loginWithRedirect</span><span class="hl-0">();</span><br/><span class="hl-0">});</span><br/><br/><span class="hl-9">//in your callback route (&lt;MY_CALLBACK_URL&gt;)</span><br/><span class="hl-7">window</span><span class="hl-0">.</span><span class="hl-12">addEventListener</span><span class="hl-0">(</span><span class="hl-8">&#39;load&#39;</span><span class="hl-0">, </span><span class="hl-10">async</span><span class="hl-0"> () </span><span class="hl-10">=&gt;</span><span class="hl-0"> {</span><br/><span class="hl-0"> </span><span class="hl-10">const</span><span class="hl-0"> </span><span class="hl-11">redirectResult</span><span class="hl-0"> = </span><span class="hl-6">await</span><span class="hl-0"> </span><span class="hl-7">auth0</span><span class="hl-0">.</span><span class="hl-12">handleRedirectCallback</span><span class="hl-0">();</span><br/><span class="hl-0"> </span><span class="hl-9">//logged in. you can get the user profile like this:</span><br/><span class="hl-0"> </span><span class="hl-10">const</span><span class="hl-0"> </span><span class="hl-11">user</span><span class="hl-0"> = </span><span class="hl-6">await</span><span class="hl-0"> </span><span class="hl-7">auth0</span><span class="hl-0">.</span><span class="hl-12">getUser</span><span class="hl-0">();</span><br/><span class="hl-0"> </span><span class="hl-7">console</span><span class="hl-0">.</span><span class="hl-12">log</span><span class="hl-0">(</span><span class="hl-7">user</span><span class="hl-0">);</span><br/><span class="hl-0">});</span>
</code></pre>
<p>For other comprehensive examples, see the <a href="https://github.com/auth0/auth0-spa-js/blob/master/EXAMPLES.md">EXAMPLES.md</a> document.</p>
<p>For other comprehensive examples, see the <a href="https://github.com/auth0/auth0-spa-js/blob/main/EXAMPLES.md">EXAMPLES.md</a> document.</p>

<a href="#api-reference" id="api-reference" style="color: inherit; text-decoration: none;">
<h2>API Reference</h2>
Expand All @@ -110,7 +110,7 @@ <h3>Contributing</h3>
<ul>
<li><a href="https://github.com/auth0/open-source-template/blob/master/GENERAL-CONTRIBUTING.md">Auth0&#39;s general contribution guidelines</a></li>
<li><a href="https://github.com/auth0/open-source-template/blob/master/CODE-OF-CONDUCT.md">Auth0&#39;s code of conduct guidelines</a></li>
<li><a href="https://github.com/auth0/auth0-spa-js/blob/master/CONTRIBUTING.md">This repo&#39;s contribution guide</a></li>
<li><a href="https://github.com/auth0/auth0-spa-js/blob/main/CONTRIBUTING.md">This repo&#39;s contribution guide</a></li>
</ul>

<a href="#raise-an-issue" id="raise-an-issue" style="color: inherit; text-decoration: none;">
Expand All @@ -137,7 +137,7 @@ <h2>What is Auth0?</h2>
Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout <a href="https://auth0.com/why-auth0">Why Auth0?</a>
</p>
<p align="center">
This project is licensed under the MIT license. See the <a href="https://github.com/auth0/auth0-spa-js/blob/master/LICENSE"> LICENSE</a> file for more info.
This project is licensed under the MIT license. See the <a href="https://github.com/auth0/auth0-spa-js/blob/main/LICENSE"> LICENSE</a> file for more info.
</p></div></div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<div class="tsd-navigation settings">
Expand Down
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export const validateCrypto = () => {
}
if (typeof getCrypto().subtle === 'undefined') {
throw new Error(`
auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/master/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.
`);
}
};
Expand Down
2 changes: 1 addition & 1 deletion static/auth0-spa-js.development_old.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4349a4b

Please sign in to comment.