-
-
Notifications
You must be signed in to change notification settings - Fork 22
Apple SSO, Google SSO & Email OTP Sign In/Up #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…responsiveness and visual consistency
|
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-70.westeurope.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-70.westeurope.5.azurestaticapps.net |
1 similar comment
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-70.westeurope.5.azurestaticapps.net |
Apple's SSO isn't possible to test on localhost due to missing an option to add such a URL in Apple Developer redirects (domains). It'll be needed to be tested on production on https://education.ditectrev.com/ |
AUTHENTICATION_SETUP.md
Outdated
|
|
||
| 1. Go to **Auth** → **Templates** | ||
| 2. Customize the email templates for: | ||
| - Magic URL (email OTP) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check with Cursor if Magic URL's are interchengeably called Email OTP's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 26fb366.
| useEffect(() => { | ||
| const handleCallback = async () => { | ||
| try { | ||
| // Check if this is an OAuth callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Question if we need it as we're handling SSO's
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
contexts/AuthContext.tsx
Outdated
| } | ||
| }; | ||
|
|
||
| const signInWithEmail = async (email: string) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need signInWithEmail is we're not using passwords?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
signInWithEmail renamed to sendEmailOTP in 26fb366 to avoid future confusions.
| start_time: number; | ||
| end_time: number; | ||
| is_active: boolean; | ||
| device_fingerprint: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete device fingerprint logic leftovers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, actually, we're still logging this and creating it in getDeviceFingerprint. When users try a different browser, or incognito tab, then this behaves like a protection for us not to start the trial again.
hooks/useSecureTrial.tsx
Outdated
| const getUserIP = async (): Promise<string> => { | ||
| // Try multiple IP services for better reliability | ||
| const ipServices = [ | ||
| "/api/get-ip", // Local API route first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't have it so can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed in 26fb366
| // If all IP services fail, use a fallback | ||
| let fallbackId = localStorage.getItem("ip_fallback_id"); | ||
| if (!fallbackId) { | ||
| // Use browser fingerprint + timestamp for uniqueness |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
question if we need IP address if we have the options here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, when all IP address endpoints fail, we use it
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-70.westeurope.5.azurestaticapps.net |
1 similar comment
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-70.westeurope.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-70.westeurope.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-70.westeurope.5.azurestaticapps.net |
lib/appwrite/auth.ts
Outdated
| } | ||
| } | ||
|
|
||
| static async updateEmailSession( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need this? It looks like a magic link leftover
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed in 26fb366; it was unused.
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-70.westeurope.5.azurestaticapps.net |
|
Azure Static Web Apps: Your stage site is ready! Visit it here: https://kind-plant-0e80e5803-70.westeurope.5.azurestaticapps.net |


Fixes #24
Pull Request Type
Summary
Introducing a requirement to sign in after 15 minutes of using our platform. This can be done by using Apple's SSO, Google's SSO, or Email OTP.