pglet icon indicating copy to clipboard operation
pglet copied to clipboard

Google Auth

Open pinkuuu1 opened this issue 3 years ago • 13 comments

This is more of a question than anything, i am using pglet for my application and it took me a while to build it with such and i also want to use gauth but without using Flask to first create another webpage and then redirect etc. Additionally, storing things like the account id in cache or something would be awesome aswell but that is another thing haha. I apologies if i sound stupid or anything with my question, i most likely am being such.

Any ideas would be appreciated!

pinkuuu1 avatar Feb 01 '22 23:02 pinkuuu1

How/where do you host your app?

FeodorFitsner avatar Feb 02 '22 00:02 FeodorFitsner

I'm currently working on it locally hosted but im planning to self host it on my server

ghost avatar Feb 02 '22 21:02 ghost

So, your question is how to configure OAuth app on Google side or how to configure it in Pglet, or both?

FeodorFitsner avatar Feb 03 '22 00:02 FeodorFitsner

...I mean you might have an app already configured by your org's admin. Just trying to understand what first should I focus on.

FeodorFitsner avatar Feb 03 '22 00:02 FeodorFitsner

Sorry for not clarifying, i'm trying to understand how to configure this well with Pglet. I've got the OAuth side of things working fine :)

ghost avatar Feb 03 '22 00:02 ghost

OK, let me fix the docs for that :)

FeodorFitsner avatar Feb 03 '22 00:02 FeodorFitsner

Cool, thank you very much :))

ghost avatar Feb 03 '22 01:02 ghost

It's still in progress, but this is a bare minimum: https://github.com/pglet/website/blob/powershell-guide/docs/pglet-server/installation.md#configuring-google-oauth

FeodorFitsner avatar Feb 03 '22 01:02 FeodorFitsner

Thank you very much, i'll have a look at this in more detail tomorrow night. Have a good rest of your day :)

ghost avatar Feb 03 '22 01:02 ghost

Yep, and this is how it works: https://pglet.io/blog/pglet-0-4-6-authentication and an example: https://github.com/pglet/examples/blob/main/python/controls/signin_app.py

FeodorFitsner avatar Feb 03 '22 04:02 FeodorFitsner

Cool thank you very much for you help, i've got it added to my app :). Just a few more questions if that is okay:

  • Can i change the title of the auth box (from "Sign in to Pglet" to "Sign in to {my app name}"? Adding onto this, can i change the image under it to my app logo?
  • Can i delete the other auth options from the menu? I only want my users to use google
  • This isn't really related to the auth but can i change the webapp icon (at the top of the browser)?

Thanks 👍

ghost avatar Feb 03 '22 21:02 ghost

Can i delete the other auth options from the menu? I only want my users to use google

Yes, you can start an app like pglet.app("pagename", target=main, permissions="google:*@yourdomain.com") - notice google: prefix.

For the rest of "branding" questions (which are absolutely legit) let's create a bunch of issues and we'll implement them :)

FeodorFitsner avatar Feb 03 '22 21:02 FeodorFitsner

Thank you very much :))

Sure thing i'll make some, over the weekend i can also look at implementing them too :)

Thank you again for your help

ghost avatar Feb 03 '22 21:02 ghost