Login page using google sheets

@TIMAI2

This is what I have done.
It is working,
But I am not satisfied !

Register_N_LogIn.aia (7.9 KB)

Can u suggest ??

Rectified the error !!!!
Good to go now !

Earlier I was comparing LogIn id with DB_Value and pwd with GetValue from the sheet.
SO !, een if userid was Not on the sheet, and any other user had SAME pwd, it was loggin in.
I had to compare the user id to GetValue from Sheet and pwd also from Get Value from sheet, and then permit LogIn. Dont that. Working fine now !

Now doing the encrypt and decrypt part

Encrypted Password

I would suggest you encrypt the username as well, and change the headings to something obscure (not User/Password)

Roger Sir WILCO

How are you doing the encryption?

Using this extension

@Anup_Ludra I replaced the uploaded extension to a link to the extension
it is only allowed for extension developers to upload their extensions to the community
thank you for considering this in future
Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by Taifun.

1 Like

Roger Sir. WILCO

The registration part is cool but the login part is tricky !! Each time, for the same password, this extension creates a different secret key, but I guess that will work OK !

That is not how the extension is supposed to work. You should just generate the keys to start with, then use them to encode

  1. I am able to get the encrypted password as per the user id from the sheet
  2. I am able to retreive the key
  3. Unaable to decrpyt. Will re try tomorow

Yes, the text encrypted with one key of the pair can be decrypted only with the other key of pair.
So @Anup_Ludra should save the other key somewhere.

Phew... Works like a charm..

Great discussion so far, Thanks TIMAI2 for the awesome script.

How can I prevent same user name registration and app will notify user already exists when registration button pushed (using google script) ! seeking a solution.

Thanks

In the example blocks above (post #20), the app first fetches a list of all user names in the database. Then any new registration name is checked against this list.


You mean this? There is a TinyDB for storing data!

I want to do all the things using google sheet. is it possible? if so, please guide me. Thanks

The login data IS all stored on the google sheet, the tinydb is used for persistent "local" storage of data on the app, in order to reduce calls to the sheet.


There is a link containing forms! can you please clear me for what it is using? Thanks

This is not my project....

The developer is using a google form to upload data to their google sheet. This avoids having to use a google apps script web app to do this.

1 Like


I have tried but as shown it is not working! any suggestion ?

Thanks