Skip to content

Commit 9b3b971

Browse files
committed
More code fixes
1 parent cd6582e commit 9b3b971

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

docs/AuthProviderWriting.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ import { PreviousLocationStorageKey } from 'react-admin';
415415
import { Auth0Client } from './Auth0Client';
416416

417417
export const authProvider = {
418-
async login() => { /* Nothing to do here, this function will never be called */ },
418+
async login() { /* Nothing to do here, this function will never be called */ },
419419
async checkAuth() {
420420
const isAuthenticated = await client.isAuthenticated();
421421
if (isAuthenticated) {
@@ -435,7 +435,7 @@ export const authProvider = {
435435
// and was redirected back to the /auth-callback route on the app
436436
async handleCallback() {
437437
const query = window.location.search;
438-
if (!query.includes('code=') && ¡query.includes('state=')) {
438+
if (!query.includes('code=') && !query.includes('state=')) {
439439
throw new Error('Failed to handle login callback.');
440440
}
441441
// If we did receive the Auth0 parameters,
@@ -452,7 +452,7 @@ You can override this behavior by returning an object with a `redirectTo` proper
452452

453453
```jsx
454454
async handleCallback() {
455-
if (!query.includes('code=') && ¡query.includes('state=')) {
455+
if (!query.includes('code=') && !query.includes('state=')) {
456456
throw new Error('Failed to handle login callback.');
457457
}
458458
// If we did receive the Auth0 parameters,

docs/Authentication.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ For instance, here's what a simple authProvider for Auth0 might look like:
189189
import { Auth0Client } from './Auth0Client';
190190

191191
export const authProvider = {
192-
async login() => { /* Nothing to do here, this function will never be called */ },
192+
async login() { /* Nothing to do here, this function will never be called */ },
193193
async checkAuth() {
194194
const isAuthenticated = await Auth0Client.isAuthenticated();
195195
if (isAuthenticated) {

0 commit comments

Comments
 (0)