Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reverting sidebar changes #10508

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ concurrency:
jobs:
tests:
name: Trigger Tests
runs-on: ubuntu-22.04-2cpu-8ram-75ssd
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
Expand Down
12 changes: 12 additions & 0 deletions articles/quickstart/backend/acul/files/auth_config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
name: auth_config.json
language: json
---

```json
//auth0-react-samples/Sample-01/src/auth_config.json
{
"domain": "${account.namespace}",
"clientId": "${account.clientId}"
}
```
47 changes: 47 additions & 0 deletions articles/quickstart/backend/acul/files/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: index.tsx
language: javascript
---

```javascript
import { LoginId } from '@auth0/auth0-acul-js';
import { useState } from 'react';

export const LoginIdScreen = () => {
const loginManager = new LoginId();
const [email, setEmail] = useState('');

return (
<div className="w-[100vw] min-h-screen flex items-center justify-center bg-gray-50 py-12 px-4 sm:px-6 lg:px-8">
<div className="max-w-md w-full space-y-6 bg-white p-8 rounded-lg shadow-md">
<input
type="email"
placeholder="Enter your email"
value={email}
onChange={(e) => setEmail(e.target.value)}
className="w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
/>

<button
className="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-black bg-blue-600 hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
onClick={() => loginManager.login({ username: email })}
>
Continue
</button>

{loginManager.transaction.alternateConnections?.map(({ name, strategy }) => (
<button
key={name}
className="w-full flex justify-center py-2 px-4 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500"
onClick={() => loginManager.socialLogin({ connection: name })}
>
Continue with {strategy}
</button>
))}
</div>
</div>
);
};

export default LoginIdScreen
```
34 changes: 34 additions & 0 deletions articles/quickstart/backend/acul/files/settings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: settings.json
language: json
---

```json
{
"rendering_mode": "advanced",
"context_configuration": [
"screen.texts"
],
"default_head_tags_disabled": false,
"head_tags": [
{
"attributes": {
"async": true,
"defer": true,
"integrity": [
"ASSET_SHA"
],
"src": "http://127.0.0.1:8080/index.js"
},
"tag": "script"
},
{
"attributes": {
"href": "http://127.0.0.1:8080/index.css",
"rel": "stylesheet"
},
"tag": "link"
}
]
}
```
45 changes: 45 additions & 0 deletions articles/quickstart/backend/acul/index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
title: Build a Login ID screen using ACUL
logo: auth0
thirdParty: false
languages:
- JavaScript
author:
name: Auth0 Team
email: [email protected]
community: false
topics:
- quickstart
contentType: tutorial
useCase: quickstart
snippets:
dependencies: quickstart/acul/dependencies
setup: quickstart/acul/setup
use: quickstart/acul/use
articles:
- interactive
default_article: interactive
show_steps: true
github:
org: auth0-samples
repo: auth0-react-samples
sdk:
name: auth0-acul-js
url: https://github.com/auth0/universal-login
logo: auth0
requirements:
- auth0-acul-js 1.0.0
next_steps:
- path: interactive
list:
- text: Configure other identity providers
icon: 345
href: "/identityproviders"
- text: Enable multifactor authentication
icon: 345
href: "/multifactor-authentication"
- text: Learn about attack protection
icon: 345
href: "/attack-protection"
- text: Learn about rules
icon: 345
href: "/rules"
115 changes: 115 additions & 0 deletions articles/quickstart/backend/acul/interactive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
title: Build a Login ID screen using ACUL
description: Learn how to build a Login screen using ACUL
interactive: true
files:
- files/settings
- files/auth_config
- files/index
github:
path: https://github.com/auth0-samples/auth0-react-samples/tree/master/Sample-01
locale: en-US
---

# Build a Login ID screen using ACUL


<p></p>

## Configure Auth0


<p>To use Auth0 services, you’ll need to have an application set up in the Auth0 Dashboard. The Auth0 application is where you will configure how you want authentication to work for the project you are developing.</p><h3>Configure an application</h3><p>Use the interactive selector to create a new Auth0 application or select an existing application that represents the project you want to integrate with. Every application in Auth0 is assigned an alphanumeric, unique client ID that your application code will use to call Auth0 APIs through the SDK.</p><p>Any settings you configure using this quickstart will automatically update for your Application in the <a href="https://manage.auth0.com/#/">Dashboard</a>, which is where you can manage your Applications in the future.</p><p>If you would rather explore a complete configuration, you can view a sample application instead.</p><h3>Configure Callback URLs</h3><p>A callback URL is a URL in your application that you would like Auth0 to redirect users to after they have authenticated. If not set, users will not be returned to your application after they log in.</p><p><div class="alert-container" severity="default"><p>If you are following along with our sample project, set this to <code>http://localhost:3000</code>.</p></div></p><h3>Configure Logout URLs</h3><p>A logout URL is a URL in your application that you would like Auth0 to redirect users to after they have logged out. If not set, users will not be able to log out from your application and will receive an error.</p><p><div class="alert-container" severity="default"><p>If you are following along with our sample project, set this to <code>http://localhost:3000</code>.</p></div></p><h3>Configure Allowed Web Origins</h3><p>An Allowed Web Origin is a URL that you want to be allowed to access to your authentication flow. This must contain the URL of your project. If not properly set, your project will be unable to silently refresh authentication tokens, so your users will be logged out the next time they visit your application or refresh a page.</p><p><div class="alert-container" severity="default"><p>If you are following along with our sample project, set this to <code>http://localhost:3000</code>.</p></div></p>

## Configure ACUL for Login ID screen {{{ data-action="code" data-code="settings.json" }}}


<p>Use <a href="https://github.com/auth0/auth0-cli">Auth0 CLI</a> to enable ACLU Login ID screen in your tenant.



In the root directory of your project, save the settings.json file.</p><p>Enable ACUL by running the following command in your terminal:</p><p><code></code><pre><code class="language-powershell">auth0 ul customize --rendering-mode advanced --prompt login-id --screen login-id --settings-file ./settings.json

</code></pre>

</p><p><div class="alert-container" severity="default"><p><b>Development Setup</b>: This example is using localhost (127.0.0.1:8080) for development. </p><p>For production, you will need to update these URLs to point to your CDN or static hosting service.</p></div></p>

## Initiate Universal Login {{{ data-action="code" data-code="auth_config.json" }}}


<p>Use one of the sample apps provided by Auth0 to initiate Universal Login</p><p>In the root folder of your project, clone the Auth0 sample application using the following command:



<pre><code class="language-powershell">git clone https://github.com/auth0-samples/auth0-react-samples

</code></pre>

</p><p>Change directory to the <code>auth0-react-samples/Sample-01 </code>folder and install the sample application using the following command:</p><p><pre><code class="language-powershell">cd auth0-react-samples/Sample-01

npm install

</code></pre>

</p><p>Change directory to the <code>auth0-react-samples/Sample-01/src</code> folder and add the <code>auth_config.json</code> file. Edit the file to add your tenant&#39;s Custom Domain.</p><p>Run the application</p><p><pre><code class="language-powershell">npm run dev

</code></pre>

</p><p><div class="checkpoint">ACUL Login ID screen Step 2 - Checkpoint <div class="checkpoint-default"><ol><li><p>Open your application (default: <a href="http://localhost:3000/">http://localhost:3000</a>)</p></li><li><p>Select the <b>Log In</b> button on the sample app</p></li><li><p>You should be redirected to your Auth0 domain</p></li></ol><p>After selecting <b>Log In</b>, you should see a blank page. </p><p>This is expected! It means Auth0 is trying to load your custom UI assets, which we have not created yet. </p></div>

<div class="checkpoint-success"></div>

<div class="checkpoint-failure"><p>If you see the default Auth0 page instead of a blank page:</p><ol><li><p>Check if your custom domain is properly configured.</p></li><li><p>Ensure your application is using the custom domain.</p></li></ol><p></p></div>

</div>

</p><p>

</p><p>

</p><p></p>

## Build a custom interface for login-id screen {{{ data-action="code" data-code="index.tsx" }}}


<p>Run a single-page application to build custom login screens. </p><h3>Configure the Boilerplate application</h3><p>1. In the root folder of your project, open a new terminal and clone the Auth0 boilerplate application using the following command:</p><p><pre><code class="language-powershell">git clone https://github.com/auth0-samples/auth0-react-samples

</code></pre>

</p><p>2. Change directory to the <code>auth0-acul-react-boilerplate</code> folder and install the application and the <a href="https://github.com/auth0/universal-login">ACUL JS SDK</a>.</p><p><pre><code class="language-javascript">// open the directory where you git clone the boilerplate

cd auth0-acul-react-boilerplate &amp;&amp; npm i



// Install the ACUL JS SDK

npm install @auth0/auth0-acul-js

</code></pre>

</p><p>3. Build the application</p><p><pre><code class="language-powershell">npm run build

</code></pre>

</p><p>4. Serve the assets</p><p><pre><code class="language-javascript">npx http-server dist -p 8080

</code></pre>

</p><p><div class="alert-container" severity="default"><p>The assets are served from localhost during development. </p><p>For production, you&#39;ll need to serve these assets from a CDN or static hosting service.</p></div></p><p><div class="checkpoint">ACUL Login ID screen quickstart step 4 checkpoint <div class="checkpoint-default"><p>After selecting <b>Log In</b>, you are greeted with a <code>“Hello World”</code> page. </p></div>

<div class="checkpoint-success"></div>

<div class="checkpoint-failure"><p>Make sure to have installed the <a href="https://github.com/auth0/universal-login">ACUL JS SDK</a> after installing the boilerplate application.</p></div>

</div></p><h3>Build the ACUL Login ID screen </h3><p>Change directory to the <code>auth0-acul-react-boilerplate/src/screens/loginId/ </code>and edit the <code>index.tsx</code> file.</p><p>Rebuild the application with the following command:</p><p><pre><code class="language-powershell">npm run build

</code></pre>

</p><p><div class="checkpoint">ACUL Login ID screen quickstart step 4 rebuild the app checkpoint <div class="checkpoint-default"><p>Select <b>Log In</b>. </p><p>You should now see a customized login page as shown below:</p><img src="//images.ctfassets.net/cdy7uua7fh8z/1RGhZSvF6omC3hH5ewzqQO/6ccb62962617d84cede8795d8ee3979d/Screenshot_2025-02-12_at_14.37.25.png" alt="" /><p></p></div>

<div class="checkpoint-success"></div>

<div class="checkpoint-failure"></div>

</div></p>
2 changes: 2 additions & 0 deletions articles/quickstart/native/android-facebook-login/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ snippets:
default_article: 00-login-facebook
articles:
- 00-login-facebook
hidden_articles:
- interactive
next_steps:
- path: 00-login-facebook
list:
Expand Down
2 changes: 2 additions & 0 deletions articles/quickstart/native/device/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ seo_alias: device
default_article: 01-login
articles:
- 01-login
hidden_articles:
- interactive
show_steps: false
2 changes: 2 additions & 0 deletions articles/quickstart/native/windows-uwp-csharp/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ seo_alias: windows-uwp-csharp
default_article: 01-login
articles:
- 01-login
hidden_articles:
- interactive
show_steps: true
github:
org: auth0-samples
Expand Down
2 changes: 2 additions & 0 deletions articles/quickstart/webapp/apache/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ seo_alias: apache
default_article: 01-login
articles:
- 01-login
hidden_articles:
- interactive
contentType: tutorial
useCase: quickstart
2 changes: 2 additions & 0 deletions articles/quickstart/webapp/java-ee/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ useCase: quickstart
seo_alias: java ee
articles:
- 01-login
hidden_articles:
- interactive
default_article: 01-login
show_steps: true
github:
Expand Down
2 changes: 2 additions & 0 deletions articles/quickstart/webapp/nginx-plus/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,7 @@ seo_alias: nginx
default_article: 01-login
articles:
- 01-login
hidden_articles:
- interactive
contentType: tutorial
useCase: quickstart
2 changes: 2 additions & 0 deletions config/included-folders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
- /articles/api/authorization-extension
- /articles/microsites
- /articles/quickstart
- /fr-ca/articles/quickstart
- /ja-jp/articles/quickstart
- /articles/_includes
- /snippets
- /updates
19 changes: 19 additions & 0 deletions fr-ca/articles/_includes/_api-auth-customize-tokens.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
You can use [Rules](/rules) to change the returned scopes of the Access Token and/or add claims to it (and the ID Token) with a script like this:

```javascript
function(user, context, callback) {

// add custom claims to Access Token and ID Token
context.accessToken['http://foo/bar'] = 'value';
context.idToken['http://fiz/baz'] = 'some other value';

// change scope
context.accessToken.scope = ['array', 'of', 'strings'];

callback(null, user, context);
}
```

::: panel-warning Namespacing Custom Claims
Auth0 returns profile information in a [structured claim format as defined by the OpenID Connect (OIDC) specification](https://openid.net/specs/openid-connect-core-1_0.html#StandardClaims). This means that in order to add custom claims to ID Tokens or Access Tokens, they must [conform to a namespaced format](/tokens/guides/create-namespaced-custom-claims) to avoid possible collisions with standard OIDC claims. You can [add namespaced claims using Rules](#optional-customize-the-tokens).
:::
3 changes: 3 additions & 0 deletions fr-ca/articles/_includes/_api_auth_intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
::: note
**New to Auth0?** Learn [how Auth0 works](/overview) and read about [implementing API authentication and authorization ](/api-auth) using the OAuth 2.0 framework.
:::
17 changes: 17 additions & 0 deletions fr-ca/articles/_includes/_boxed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<div class="boxed">
<h3 class="title">
<a href="#" class="feature">
<span class="section-name">Logs</span>
</a>
</h3>
<ul class="list clearfix">
<div class="clearfix">
<li data-toggle="popover" class="info" title="">Review the logged data of both actions taken in the dashboard by the administrators, as well as authentications made by your users.</li>
<li data-toggle="popover" class="info" title="">Facilitate diagnosis and resolution of authentication issues.</li>
</div>
<div class="clearfix">
<li data-toggle="popover" class="info" title="">Longer Storage of log data for your apps.</li>
</div>
</ul>
<p class="log-retention-notice">Your current subscription allows to keep your logs for the last <span class="archive-days">30</span> days.</p>
</div>
5 changes: 5 additions & 0 deletions fr-ca/articles/_includes/_callback_url.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- markdownlint-disable MD002 MD041 -->

### Configure Callback URLs

A callback URL is a URL in your application where Auth0 redirects the user after they have authenticated. The callback URL for your app must be added to the **Allowed Callback URLs** field in your [Application Settings](${manage_url}/#/applications). If this field is not set, users will be unable to log in to the application and will get an error.
1 change: 1 addition & 0 deletions fr-ca/articles/_includes/_calling_apis.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
A common need for any client-side application is to access resources from a data API. Some of these data resources will likely need to be protected such that only the user who is authenticated in the client-side app can access them. This can be achieved by protecting your API's endpoints with your Auth0 secret key and sending the user's JWT as an `Authorization` header when calling the API. For more detail on how to secure your API, see the [server API documentation](/quickstart/backend).
3 changes: 3 additions & 0 deletions fr-ca/articles/_includes/_checksession_polling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
In some multi-application scenarios, where Single Logout is desired (a user logging out of one application needs to be logged out of other applications), an application can be set up to periodically poll Auth0 using `checkSession()` to see if a session exists. If the session does not exist, you can then log the user out of the application. The same polling method can be used to implement silent authentication for a <dfn data-key="single-sign-on">Single Sign-on (SSO)</dfn> scenario.

The poll interval between checks to `checkSession()` should be at least 15 minutes between calls to avoid any issues in the future with rate limiting of this call.
Loading
Loading