<button onclick="simpleLogin()">
Login with SimpleLogin
</button>
<!-- Include SimpleLogin JS SDK -->
<script src="https://simplelogin.io/sdk/sdk.js"></script>
SL.init("quickstart"); // Your SimpleLogin AppID
function simpleLogin() {
SL.login(function(user){
// This is where you log user in :)
console.log("SimpleLogin user", user);
});
}
import requests_oauthlib, os
# Your SimpleLogin AppID, AppSecret
CLIENT_ID = os.environ.get("CLIENT_ID")
CLIENT_SECRET = os.environ.get("CLIENT_SECRET")
@app.route("/login")
def login():
sl = requests_oauthlib.OAuth2Session(
CLIENT_ID,
redirect_uri="http://localhost:5000/callback"
)
redirect_url, _ = sl.authorization_url(
"https://app.simplelogin.io/oauth2/authorize"
)
return flask.redirect(redirect_url)
@app.route("/callback")
def callback():
sl = requests_oauthlib.OAuth2Session(CLIENT_ID)
sl.fetch_token(
"https://app.simplelogin.io/oauth2/token",
client_secret=CLIENT_SECRET,
authorization_response=flask.request.url
)
user_info = sl.get("https://app.simplelogin.io/oauth2/userinfo").json()
print(user_info["email"], user_info["name"], user_info["avatar_url"])
return "Welcome " + user_info["name"]
# Based on social-auth-app-django library
pip install git+ssh://git@github.com/simple-login/social-core.git@sl
# settings.py
AUTHENTICATION_BACKENDS = [
'social_core.backends.simplelogin.SimpleLoginOAuth2',
'django.contrib.auth.backends.ModelBackend',
]
SOCIAL_AUTH_SIMPLELOGIN_KEY = 'YOUR_APP_ID'
SOCIAL_AUTH_SIMPLELOGIN_SECRET = 'YOUR_APP_SECRET'
<!-- In your login template -->
<a href="{% url 'social:begin' 'simplelogin' %}">Login with SimpleLogin</a>
// config SimpleLogin OIDC
passport.use('SimpleLogin', new OidcStrategy({
issuer: 'https://app.simplelogin.io',
authorizationURL: 'https://app.simplelogin.io/oauth2/authorize',
tokenURL: 'https://app.simplelogin.io/oauth2/token',
userInfoURL: 'https://app.simplelogin.io/oauth2/userinfo',
clientID: process.env.CLIENT_ID, // SimpleLogin AppId
clientSecret: process.env.CLIENT_SECRET, // SimpleLogin AppSecret
callbackURL: process.env.URL + '/authorization-code/callback',
scope: 'openid profile'
}, (issuer, sub, profile, accessToken, refreshToken, done) => {
return done(null, profile);
}));
// show user info
app.use('/profile', (req, res) => {
console.log("user:", req);
res.render('profile', {
title: 'User Info',
user: req.user._json
});
});
Created by developer for developer
SimpleLogin is compatible with all Oauth2/OpenID Connect libraries.
As a software engineer, I like SimpleLogin concept and its streamlined development experience.
There are some solutions with a similar purpose, but none of them is transparent for users. Or simple enough for developers to integrate.
Finally, a service that makes people conscious about PRIVACY. And helps developers bring trust to their brand identity in a SIMPLE way.
Frequently asked questions
That's a very good question! Do you know that Facebook and Google use these buttons to track
your users browsing history so that they can provide more personalized ads? And do you get any of
these ad-generated revenue?
SimpleLogin, with a transparent pricing model (you know where our revenue comes from) with a single product that focus solely on improving the login experiences yet still giving users total control over their data, does not have any incentive to utilize your user data.
In addition, we believe in a fair model: users come to your website because your website brings value to them and we are in a win-win relationship, so you deserve to have a share of the benefit.
About Apple, they claim to not selling your users data to advertisers but being an advertiser
themselves, how can we be sure ...
Apple can also be considered as an ad platform with their Apple Search Ads so better to not put Apple
in a (much) higher position than Facebook or Google in terms of privacy.
Arguments about transparent pricing and fair model apply to Apple too 😉
SimpleLogin code is fully open-source on Github and can be self-hosted. Anyone can freely audit the code or setup their own SimpleLogin server.
SimpleLogin revenue is based on a transparent and sustainable model that allows us to have a privacy-first and tracker-free product.
Yes absolutely! We started with the web platform simply because they can be used for mobile app as well via a Android WebView or IOS UIWebView. We plan to provide a SDK and some examples for Android, iOS, Windows quite soon. Stay tuned!
The current advertising model is based on an unfair model where big players (Google, Facebook, etc)
take almost all benefit and app/content creators get almost nothing. We strongly believe a
sustainable model should be fair: our partners should get an important part of the revenue because
together with SimpleLogin, we provide a great login experience to user while respecting user privacy
at the same time.
The revenue formula is still work-in-progress as we need to take into account different factors
(mostly payment processing fee and tax rate) but hopefully this can give you a rough idea on how it
works.
The payment period is monthly and works as following:
- a user John opts for the premium subscription. John pays 20$/year. After processing fee and taxes,
let's assume SimpleLogin receives 12$ net (this number is quite optimist in France 😉), which is
1$/month. Half of this will be distributed to partners.
- John uses N apps that implement SimpleLogin: each app will get an equal part of the revenue.
Let's put this into a concrete example. The following numbers are of course hypothesis.
- the average number of app a user uses per month is about 10, half of them implement SimpleLogin,
that makes N=5.
- you have a website/app that has 1M users, half of them use SingleLogin and 10% of them are paying
customers, that is 1 000 000*0.5*0.1=50 000 paying users.
Using our formula, each month you will receive:
monthly_revenue = total_number_of_paying_user * 1/2 * monthly_net_revenue / average_app_number
monthly_revenue = 50000 * 1/2 * 1 / 5 = 5000$