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

Commit8d26857

Browse files
committed
Update next app
1 parent8097725 commit8d26857

File tree

1 file changed

+14
-16
lines changed
  • examples/useauth-create-next-app/pages

1 file changed

+14
-16
lines changed
Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
importReactfrom"react";
2-
importAppfrom"next/app";
3-
import{AuthProvider}from"react-use-auth";
1+
2+
import{AuthConfig}from"react-use-auth";
3+
import{Auth0}from"react-use-auth/auth0";
44
import{useRouter}from"next/router";
55

66
functionMyApp({ Component, pageProps}){
77
constrouter=useRouter();
8-
98
return(
10-
<AuthProvider
11-
navigate={router.push}
12-
auth0_domain="useauth.auth0.com"
13-
auth0_client_id="GjWNFNOHq1ino7lQNJBwEywa1aYtbIzh"
14-
>
9+
<>
10+
<AuthConfig
11+
authProvider={Auth0}
12+
navigate={(url)=>router.push(url)}
13+
params={{
14+
domain:"webreplay.us.auth0.com",
15+
clientID:"E1B33wDDkz0J4mUC2WAVA2552Fj91uux"
16+
}}
17+
/>
1518
<Component{...pageProps}/>
16-
</AuthProvider>
19+
</>
1720
);
1821
}
1922

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-
}
23+
exportdefaultMyApp

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp