Skip to content

Commit

Permalink
add prefix /api
Browse files Browse the repository at this point in the history
  • Loading branch information
petersg83 committed Dec 6, 2021
1 parent 57e2164 commit 945ebb7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion login-react/src/pages/Home.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const providersNames = [
'auth0',
];

const LoginButton = (props) => <a href={`${backendUrl}/connect/${props.providerName}`}>
const LoginButton = (props) => <a href={`${backendUrl}/api/connect/${props.providerName}`}>
<button style={{ width: '150px' }}>Connect to {props.providerName}</button>
</a>;

Expand Down
2 changes: 1 addition & 1 deletion login-react/src/pages/LoginRedirect.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const LoginRedirect = (props) => {
useEffect(() => {
// Successfully logged with the provider
// Now logging with strapi by using the access_token (given by the provider) in props.location.search
fetch(`${backendUrl}/auth/${params.providerName}/callback${location.search}`)
fetch(`${backendUrl}/api/auth/${params.providerName}/callback${location.search}`)
.then(res => {
if (res.status !== 200) {
throw new Error(`Couldn't login to Strapi. Status: ${res.status}`);
Expand Down

0 comments on commit 945ebb7

Please sign in to comment.