Shawner
Shawner

Reputation: 69

Google App Engine authentication options

I'm looking to put an app on Google Cloud (basically going to convert a visual basic project into Javascript and then upload it.) I want to start a subsciption service for a cloud-based application and it's not going to be gargantuan by any stretch of the imagination. Very small (read: not tons of columns or huge amounts of data) and just want to give users an option.

I signed up today and noticed there were 3 options for authentication. However, I don't see alternatives (example: authentication based on a confirmed paid customer account).

Am I to assume that there's no other way to limit access for a Google App Engine app (for proprietary reasons)?

Upvotes: 1

Views: 1053

Answers (2)

Andrei Volgin
Andrei Volgin

Reputation: 41089

Authentication is not related to paid/unpaid. Before you can find out whether an account is "paid", you need to know who this user is. This is what authentication does. AppEngine has built-in support for Google account or OpenId authentication. You can use Facebook for authentication, if you want, but you have to integrate it yourself.

Once you know which user has accessed your app, you can decide which parts of your app are available to free users, paid accounts, etc.

Upvotes: 0

Paul Collingwood
Paul Collingwood

Reputation: 9116

You can limit access to whoever you want, you'll just have to track users somehow and give them a token of some sort that gives them access, or not.

I've done a small forum using webapp2 sessions. Each user gets a persistent ID they can retrieve via logging in with a username and password, and only if they have an ID on the right list can they access certain content. webapp2 sessions

# To set a value:
self.session[username] = 'Paid'

# To get a value:
is_paid = self.session.get(username)

Perhaps (I've not used it) have a look at app engine boilerplate, it has lots of login options you could use. App Engine Boilerplate | Test the Login

Upvotes: 1

Related Questions