Facebook/Google Login in Renpy App game

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Bruni Multimedia
Regular
Posts: 114
Joined: Mon May 15, 2017 12:23 pm
Projects: Yomi Alliance
Organization: Bruni Multimedia
itch: brunimultimedia
Contact:

Facebook/Google Login in Renpy App game

#1 Post by Bruni Multimedia » Fri Sep 02, 2022 3:21 am

As per title, is it possible to enable a Google/Facebook login for a ren'py mobile game?

I just want the game to know who's playing it, storing that info in the .persistent file and using it to send data through google analytics.

Thanks!

User avatar
Andredron
Miko-Class Veteran
Posts: 535
Joined: Thu Dec 28, 2017 2:37 pm
Completed: Kimi ga nozomu renpy-port(demo), Albatross Koukairoku(demo)
Projects: Sisters ~Natsu no Saigo no Hi~(renpy-port)
Location: Russia
Contact:

Re: Facebook/Google Login in Renpy App game

#2 Post by Andredron » Fri Sep 02, 2022 5:49 am

I'm writing a Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18

Help me to register in QQ International

Honest Critique

User avatar
PyTom
Ren'Py Creator
Posts: 15893
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Facebook/Google Login in Renpy App game

#3 Post by PyTom » Mon Sep 05, 2022 1:31 pm

I don't think it makes sense to use the google apis directly in a Ren'Py game. (They are more a server side thing.)

It might be possible to get this information using pyjnius or pyobjus, but this isn't something that's built into Ren'Py.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama • https://www.patreon.com/renpytom

User avatar
Andredron
Miko-Class Veteran
Posts: 535
Joined: Thu Dec 28, 2017 2:37 pm
Completed: Kimi ga nozomu renpy-port(demo), Albatross Koukairoku(demo)
Projects: Sisters ~Natsu no Saigo no Hi~(renpy-port)
Location: Russia
Contact:

Re: Facebook/Google Login in Renpy App game

#4 Post by Andredron » Mon Sep 05, 2022 3:51 pm

Bruni Multimedia wrote:
Fri Sep 02, 2022 3:21 am
As per title, is it possible to enable a Google/Facebook login for a ren'py mobile game?

I just want the game to know who's playing it, storing that info in the .persistent file and using it to send data through google analytics.

Thanks!
Once I suggested enabling such apis by default, but Mr. Python answered like this
PyTom wrote:
Tue May 24, 2022 1:07 pm
In general, things like these don't make sense to include in a game. Without looking too close at any one of these, I'd expect them to require some sort of API key to access the social network site. If such a key is included, then anyone that key could impersonate you to spam.

What you generally want is to have your own website, that intermediates access between the game and the social networks. So your game would use the built-in requests module to talk to your webserver to verify the social post has been done, and then your website will take care of contacting the social networks to request the entire data that you need.

This also lets you update the supporting website in the (likely) even that one of the social networks changes its API, and not have to deploy that change to all the games in the field.
Roughly speaking, for the sake of the security of user data, most likely they will not answer you exactly how to do it, just hint where to look, and you will continue on your own
I'm writing a Renpy textbook (in Russian). https://disk.yandex.ru/i/httNEajU7iFWHA (all information is out of date) Update 22.06.18

Help me to register in QQ International

Honest Critique

Post Reply

Who is online

Users browsing this forum: Ocelot