Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/chaudhuree/mern-auth-template


https://github.com/chaudhuree/mern-auth-template

Last synced: 4 days ago
JSON representation

Awesome Lists containing this project

README

        

## for google authentication

- firebase a sob setup kore nite hobe

- then font end a akta button rakhte hobe jeta firbase login k trigger korbe (Login with google)

- login popup ashle seta successfully login done hoile j response data ta ashbe oi data ta backend a pathay dibo

- backend a googleLogin handle korar jonne alalda akta controller create korbo

- ai controller first a check korbe ai gmail dea kono user ase kina

- jodi thake, jehutu aita alada controller so amra aikhane password verification er kono issue rakhbo na. just normally id ta k tokenize kore cookie te set korbo and normally onno login handle korar moto sob data send kore dibo

- but for the first time jodi gmail login dey tokhn kintu dekha jabe ai email dea kono user nei

- tokhn akta random password generate korbo. jehutu aita google login so aitar sathe password verification er kono issue nei tai amra akta password set kore dibo. password set kore ditei hobe cz amader model a aita required rakha hoyece.

- passord set kora hoye gele baki sob onno login er moto kore set kobo. plus google login korle amra fontend theke user er picture tao pabo oita o data er moddhe add kore new user create korte hobe then porer dhap logged in user er motoi.

- j user create hoilo tar id ta tokenize korbo then seta cookie te set korbo and response a user er baki sob jinish pathay dibo. done.