Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7b1e531

Browse files
committed
Update next app
1 parent9c18f1c commit7b1e531

File tree

3 files changed

+1176
-3220
lines changed

3 files changed

+1176
-3220
lines changed

‎examples/useauth-create-next-app/package.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
},
1010
"dependencies": {
1111
"auth0-js":"^9.13.2",
12-
"next":"9.3.2",
12+
"next":"10.0.3",
1313
"react":"16.10.2",
1414
"react-dom":"16.10.2",
15-
"react-use-auth":"^0.5.1",
15+
"react-use-auth":"2.0.2",
1616
"rebass":"^4.0.6"
1717
}
18-
}
18+
}
Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,22 @@
1-
importReactfrom"react";
2-
importAppfrom"next/app";
3-
import{AuthProvider}from"react-use-auth";
1+
import{AuthConfig}from"react-use-auth";
2+
import{Auth0}from"react-use-auth/auth0";
43
import{useRouter}from"next/router";
54

65
functionMyApp({ Component, pageProps}){
76
constrouter=useRouter();
8-
97
return(
10-
<AuthProvider
11-
navigate={router.push}
12-
auth0_domain="useauth.auth0.com"
13-
auth0_client_id="GjWNFNOHq1ino7lQNJBwEywa1aYtbIzh"
14-
>
8+
<>
9+
<AuthConfig
10+
authProvider={Auth0}
11+
navigate={url=>router.push(url)}
12+
params={{
13+
auth0_domain:"useauth.auth0.com",
14+
auth0_client_id:"GjWNFNOHq1ino7lQNJBwEywa1aYtbIzh"
15+
}}
16+
/>
1517
<Component{...pageProps}/>
16-
</AuthProvider>
18+
</>
1719
);
1820
}
1921

20-
// extend App component and return our function so we can use useRouter :P
21-
exportdefaultclass_AppextendsApp{
22-
render(){
23-
return<MyApp{...this.props}/>;
24-
}
25-
}
22+
exportdefaultMyApp;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp