Skip to content
Merged
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
64 changes: 64 additions & 0 deletions llmstack/client/src/components/LoginDialog.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import {
Typography,
Button,
Dialog,
DialogContent,
DialogContentText,
DialogTitle,
Link,
Stack,
} from "@mui/material";

function LoginDialog({ open, handleClose, redirectPath }) {
return (
<Dialog
open={open}
onClose={handleClose}
aria-labelledby="login-dialog-title"
aria-describedby="login-dialog-description"
>
<DialogTitle
id="login-dialog-title"
sx={{ display: "flex", justifyContent: "center" }}
>
<Typography variant="h4">Sign in to continue</Typography>
</DialogTitle>
<DialogContent>
<DialogContentText id="login-dialog-description">
<Stack sx={{ alignItems: "center" }}>
<Typography variant="body" gutterBottom>
Access 100+ community applications for free. Use ChatGPT, GPT-4,
Claude 2, DALLE 3, and others - all on Promptly.
</Typography>
<Stack sx={{ width: "100%", alignItems: "center" }}>
<Link
underline="none"
href={
redirectPath
? `/api/provider/login?provider_id=google&redirectUrl=${redirectPath}`
: "/api/provider/login?provider_id=google"
}
>
<Button variant="contained" autoFocus>
Login With Google
</Button>
</Link>
</Stack>
<Typography variant="caption" sx={{ marginTop: "4px" }}>
By continuing, you agree to our{" "}
<span>
<a href="https://www.trypromptly.com/tos">Terms of Service</a>
</span>{" "}
and{" "}
<span>
<a href="https://www.trypromptly.com/privacy">Privacy Policy</a>
</span>
</Typography>
</Stack>
</DialogContentText>
</DialogContent>
</Dialog>
);
}

export default LoginDialog;
4 changes: 0 additions & 4 deletions llmstack/server/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,3 @@ def populate_user(self, request, sociallogin, data):
user.email = user.username

return user

def get_connect_redirect_url(self, request, socialaccount):
logger.debug(f"get_connect_redirect_url: params: {request.GET}")
return request.GET.get("redirectUrl", "/")