Innovateninjas / Paws-frontend

A fast responsive webapp that allows you to report injured stray animals to the nearest NGOs.
https://pawss.vercel.app
GNU General Public License v3.0
60 stars 99 forks source link

Google auth #292

Closed adarsh1001111 closed 4 months ago

adarsh1001111 commented 4 months ago

Description

Added Google Auth Using Firebase for SignUp and Login.

Related Issue

277

Screenshots :

Google SignUp Button added on the SignUp page:

Screenshot 2024-05-12 at 1 46 15 AM

Clicking the Google SignUp Button Opens the Google Auth Page having your Gmail accounts:

Screenshot 2024-05-12 at 1 46 58 AM

Selecting the account to SignUp with:

Screenshot 2024-05-12 at 1 47 18 AM

SignUp in progress:

Screenshot 2024-05-12 at 1 47 28 AM

User Signed Up :

Screenshot 2024-05-12 at 1 47 36 AM

User Details(name,email) captured via Google Account:

Screenshot 2024-05-12 at 1 47 46 AM

User Successfully LoggedOut via LogOut Button on the UserDetails Page:

Screenshot 2024-05-12 at 1 47 54 AM

Checklist:

Additional Notes

For Now, the SignUp through Google automatically sets the Password to -"0000" and the Phone number to -"0000000000"(10 digits) Since these info can't be provided only via the Google Auth, there should be an option to change the Phone Number and Password further after the login in another issue for this. Also as many websites provide a password via email if logged in through Google auth can be done.

rishicds commented 4 months ago

Hi @adarsh1001111 , good job but can you please make the button rounded so it fits in with the rest of website? Thank you.

codewarnab commented 4 months ago

image i am facing this error ( ihave allowed popup still please test it properply google login ) also you cant send a arbitary number keep it blank if the backend allows else need to modify backend to fit google login properly

adarsh1001111 commented 4 months ago

image i am facing this error ( ihave allowed popup still please test it properply google login ) also you cant send a arbitary number keep it blank if the backend allows else need to modify backend to fit google login properly

it says auth config not found means what i did with firebase.js (i exported the auth ) and imported in the register page so that it could work

adarsh1001111 commented 4 months ago

you can just add another file for firebase.js and write the firebase config of your paws project of authentication and then use getAuth and export that auth, @codewarnab , also backend didnt allowed "" null string in phone and pass thats why i did "0 casing"

adarsh1001111 commented 4 months ago

Hi @adarsh1001111 , good job but can you please make the button rounded so it fits in with the rest of website? Thank you.

i did it actually it was overridden by border radius 4px , i corrected it , its 40px rounded now

adarsh1001111 commented 4 months ago

i have uploaded a video of my testing on my drive , view this once link: https://drive.google.com/file/d/1zbPozyHE8HgcKXumrMldP1SkeXUbYJYK/view?usp=drive_link

adarsh1001111 commented 4 months ago

@codewarnab any updates ? if this PR is fine , i will switch to the backend for phone number and password for google auth sign in, please check if nothing is broken , till my knowledge everything works just the phone no. and pass has to be fixed from backend repo

rishicds commented 4 months ago

Hi @adarsh1001111 ,its okay, good job!