Skip to content

Commit

Permalink
redirect url login modified
Browse files Browse the repository at this point in the history
  • Loading branch information
jjimenezgarcia committed May 2, 2023
1 parent 35b4538 commit 2b670b1
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions webapp/src/components/Solid/User/UserLogin.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
import { useState } from "react";
import { useEffect, useState } from "react";
import { LoginButton } from "@inrupt/solid-ui-react";
import { Button, TextField, FormGroup, Container } from "@mui/material";

const UserLogin = () => {
const [idp, setIdp] = useState("https://inrupt.net");
const [currentUrl, setCurrentUrl] = useState("https://localhost:3000/");

useEffect(() => {
setCurrentUrl(window.location.href);
}, [setCurrentUrl]);

const styles = {
fontFamily: 'Roboto, sans-serif',
color: '#d7dce4',
Expand Down Expand Up @@ -33,7 +38,7 @@ const UserLogin = () => {
InputProps={{
readOnly: true,
endAdornment: (
<LoginButton oidcIssuer={idp} redirectUrl={"https://arquisoft-lomap-es6c.netlify.app/start"}>
<LoginButton oidcIssuer={idp} redirectUrl={currentUrl}>
<Button name="LOGIN" style={buttonStyle} variant="contained" color="primary">
Login
</Button>
Expand Down

0 comments on commit 2b670b1

Please sign in to comment.