Privacy-friendly alternative to Login with Facebook
SimpleLogin is built for privacy-conscious site owners and protects your users identity. Open-source, Developer-first, SimpleLogin can be integrated in minutes.
<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
Vidste du godt at Facebook og Google bruger disse knapper til at spore dine brugeres browserhistorik, så de kan levere mere personlige annoncer?
Da SimpleLogin ikke er drevet af reklamer og giver brugerne total kontrol over deres data, har vi ikke noget incitament til at bruge dine brugeres data.
Alt SimpleLogin-kode er fuldt open source på GitHub.
Enhver kan frit revidere koden eller sætte deres egen SimpleLogin-server op.
SimpleLogins indtægter er baseret på en transparent og bæredygtig model, der gør det muligt for os at have et produkt uden trackere og med privatlivsbeskyttelse i fokus.
Ja, helt klart! Vi startede med web-platformen fordi den også kan bruges til mobilapps via et Android WebView eller iOS UIWebView.
Vi planlægger at levere et SDK og nogle eksempler til Android, iOS og Windows ganske snart. Hold godt øje!