Socket.io+ RenRen

Setup your application's code

<!-- Auth0Lock script -->
<script src="https://cdn.auth0.com/js/lock/10.12.1/lock.min.js"></script>

<!-- Setting the right viewport -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />

Add the following lines to your base code

var userProfile;
var userToken = localStorage.getItem('userToken');;

lock.on('authenticated', function(authResult) {
    lock.getProfile(authResult.idToken, function(error, profile) {
        if (error) {
            // Handle error
            return;
        }
        localStorage.setItem('userToken', authResult.idToken);
        userProfile = profile;
        userToken = authResult.idToken;
    });
});

if (userToken) {
    lock.getProfile(userToken, function (err, profile) {
        if (err) {
            return alert('There was an error getting the profile: ' + err.message);
        }        
        userProfile = profile;
    });
}

$('#login button').click(function(e){
  e.preventDefault();
  lock.show();
});

Create an Application in Auth0 dashboard 

Create an Application in Auth0 dashboard

Create a Social RenRen Connection under Connections / Social section

Create a Social Connection for authentication
GET STARTED IN MINUTES
Authentication Security and Availability

Authentication Built for Security & High Availability

Auth0 is the easiest way for developers to integrate enterprise-grade authentication and identity management to any app.

Industry Standard Compliance
Authentication Certifications and Compliance

SOC 2, HIPAA/BAA, EU/US Privacy Shield Framework, Open ID Certified.

Learn More
Built by Security Experts
uthentication Experts

Continuously reviewed and tested by external security experts. Strong password encryption and hashing algorithms, at rest and in transit.

Learn More
What Our Customers Say
Authentication Case Studies

Continuously reviewed and tested by external security experts. Strong password encryption and hashing algorithms, at rest and in transit.

Learn More
Availability & trust
Authentication Availability

Uptime time in 3 different regions.

Learn More
Host Anywhere
Auth0 Appliance

Deploy On-Premises or on Cloud on your data center or Auth0’s one.

Learn More
Auth0 Active Users

Get Auth0 free for 7,000 active users per month with unlimited logins

  • Single Sign On
  • Passwordless Login
  • Up to 2 Social Identity Providers
  • Multifactor Authentication
  • User Management
  • Extensibility (Run custom code on Auth)

Some of the companies that trust us every day

Atlassian - Authentication CustomerPBS - Authentication CustomerNVIDIA - Authentication CustomerMozilla - Authentication CustomerBluetooth - Authentication CustomerFinancial Times - Authentication CustomerJet - Authentication CustomerHMH - Authentication CustomerOptimizely - Authentication CustomerPolaris - Authentication CustomerHarper - Authentication CustomerNews Corp - Authentication Customer