r/GoogleAppsScript • u/Hairy-Telephone4408 • 17d ago
Question How difficult is adding Google sign-in to a small Google Apps Script web app?
I'm building a custom fantasy football web app using Google Apps Script and Google Sheets as the backend, with ChatGPT helping me write the code. I'm a beginner with very little programming experience.
The app will have 10 users. Five will need to sign in to manage their own teams (add/drop players, change lineups, etc.), while the other five will only need to view the app. I'll also need commissioner/full access to manage all teams.
ChatGPT recommended using Google Identity Services for sign-in, with the Apps Script backend running under my account so users won't need access to my private spreadsheets.
Before I get too deep into this, I'd appreciate some advice from people who've actually done something similar:
- How difficult is this to set up, especially for a beginner relying on ChatGPT?
- Is it genuinely free for a project this small?
- Are there any major security issues, Google restrictions, or other headaches I should anticipate?
- Is there a simpler or better alternative I should consider?
I'm hoping to keep things free, relatively simple for users, and manageable for someone without much coding experience, but if there's a solution out there that costs but is still affordable I'm open to learning about that.
Thank you for your time.
7
u/MakMak737 17d ago
For 10 people it's genuinely free: Apps Script + Sheets cost nothing at that size. A few things worth knowing before you go the Google sign-in route:
How are you storing the rosters right now: one tab per team or one big table?
4
u/rs12345asdf 17d ago
Proposed Approach:
User enters their email on the landing page.
System validates the email against a pre-approved allowlist.
If allowed, an OTP is sent for verification; unauthorized emails are rejected.
3
u/bmanfield 15d ago
You can add Google login to your applications using the Cloudflare Zero Trust Dashboard on the Free plan (which supports up to 50 users).
Prerequisites & Free Plan Limits
Cost: $0/month for up to 50 users.
Requirements: Your domain DNS must be managed through Cloudflare, and you will need access to the Google Cloud Console to create an OAuth client.
2
u/No_Passion8988 16d ago
The problem arises when users have multiple Google sign-ins for accessing Gmail accounts with a single Google profile which is quite common in a real-world scenario. Authentication fails. I had to use Firebase for Google authentication.
1
u/ashdabag 14d ago
If there is enough trust between the 10 of you, the simplest solution is a dropdown where each user selects their own profile and then makes whatever roster changes they want. Of course, nothing technically prevents someone from selecting another person's profile.
If there isn't trust, you can ask for a password after the profile is selected. In that case, tell everyone to use a password specifically for this app, not one they use elsewhere - because the passwords will be stored in the sheets. Also, it would be good practice not to store those passwords as plain text in the Sheet.
The individual-link solution also works (give each of the 5 managers a different link with a long random key, map each key to a team, and give yourself a commissioner key). It's simple and avoids Google sign-in, but you then have 5 separate links/keys to generate, distribute and manage. It can become a bit more complicated if more people join.
1
u/mystique0712 11d ago
Google Identity Services is pretty straightforward for basic sign-in, but for what you're describing, using the built-in Apps Script Session.getActiveUser().getEmail() is simpler and free.
You'd then check that email against a sheet of authorized users to grant access.