1
0
mirror of https://github.com/sasjs/server.git synced 2025-12-10 19:34:34 +00:00

chore: embedded clientId for web component

This commit is contained in:
Saad Jutt
2021-11-10 20:00:27 +05:00
parent 98ef40ffd6
commit 31959455c3
3 changed files with 16 additions and 23 deletions

View File

@@ -23,12 +23,13 @@ const getTokens = async (payload: any) => {
}
const Login = ({ setTokens }: any) => {
const [clientId, setClientId] = useState()
const [username, setUserName] = useState()
const [password, setPassword] = useState()
const handleSubmit = async (e: any) => {
e.preventDefault()
const { REACT_APP_CLIENT_ID: clientId } = process.env
const { code } = await getAuthCode({
clientId,
username,
@@ -57,15 +58,6 @@ const Login = ({ setTokens }: any) => {
<h2>Welcome to SASjs Server!</h2>
<br />
<TextField
id="client-id"
label="Client ID"
type="text"
variant="outlined"
onChange={(e: any) => setClientId(e.target.value)}
autoFocus
required
/>
<TextField
id="username"
label="Username"