Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"java.compile.nullAnalysis.mode": "automatic",
"java.configuration.updateBuildConfiguration": "automatic"
}
67 changes: 67 additions & 0 deletions react-social/package-lock.json

Large diffs are not rendered by default.

12 changes: 7 additions & 5 deletions react-social/src/user/oauth2/OAuth2RedirectHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,26 @@ class OAuth2RedirectHandler extends Component {
return results === null ? '' : decodeURIComponent(results[1].replace(/\+/g, ' '));
};

render() {
render() {
const token = this.getUrlParameter('token');
const error = this.getUrlParameter('error');
console.log(token)
console.log(error)

if(token) {
localStorage.setItem(ACCESS_TOKEN, token);
return <Redirect to={{
pathname: "/profile",
state: { from: this.props.location }
}}/>;
}}/>;
} else {
return <Redirect to={{
pathname: "/login",
state: {
state: {
from: this.props.location,
error: error
error: error
}
}}/>;
}}/>;
}
}
}
Expand Down
Loading