npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@optisolbusiness/react-native-social-login

v0.0.21

Published

test

Downloads

21

Readme

@optisolbusiness/react-native-social-login

@optisolbusiness/react-native-social-login

Installation

npm i @optisolbusiness/react-native-social-login

Usage

import { 
  SocialLoginFacebook,
  SocialLoginGmail,
  SocialLoginLinkedin,
  SocialLoginApple,
  SocialLoginTwiter } from "@optisolbusiness/react-native-social-login";

// ...

 <SocialLoginFacebook onResponse={onResponse} />
 <SocialLoginGmail
   onResponse={onResponse}
   webClientId={
     "141885507289-p184kodadu0ok5abtpj3av3f28atvcfq.apps.googleusercontent.com"
   }
 />
 <SocialLoginLinkedin
   clientID="77qy8me13kppie"
   clientSecret="hTx7dlg2Uw2dEFW9"
   redirectUri="http://localhost:8081/auth/linkedin/callback"
   onResponse={onResponse}
 />
 <SocialLoginApple onResponse={onResponse} />
 <SocialLoginTwiter onResponse={onResponse} />

Congiguration

1. Login With Google

install react-native-google-signIn dependency

npm install react-native-google-signin — save

Install Cocoa Pods cd ios && pod install && cd ..

Reference

https://github.com/react-native-google-signin/google-signin

Step 1: Create Firebase Project

A. Create Firebase Project on https://console.firebase.google.com/ B. Select android platform C. Enter the name of your package and SHA1 key→Register App following image shows a step to find a SHA1 key D. Download config file → move it to Android app module directory → go to Next

Step 2: Enable Google Login in Firebase

Authentication → Sign-In Method → Google

We need to give a name for your Auth consent screen and save your web client Id. This will be used to integrate the React Native app with Firebase.

Step 3: Implement Google auth functions in RN app

A. Google Login button

<SocialLoginGmail
   onResponse={onResponse}
   webClientId={
     ""
   }
 />

2. Login With Facebook

$ npm install react-native-fbsdk –save

$ cd ios && pod install && cd ..

Step 1: Create a new App on Facebook console

reference

https://github.com/thebergamo/react-native-fbsdk-next

we need to register our app’s package/bundle name on Facebook Console viz. https://developers.facebook.com/

Update the basic details and adding a specific platforms -Add Android Platform -Add Facebook App Id in Android code -Enter some details inside Basic submenu of Dashboard: We need a keyHash using SHA1: For finding the SHA1 fingerprint you can click on below url and can generate a Release Key Hash or Debug Key Hash using Release SHA1 or Debug SHA1 respectively: For getting a Key Hashes, visit http://tomeko.net/online_tools/hex_to_base64.php

Add meta-data in the AndroidManifest.xml file

copy this AppId and paste it in string.xml ""

Step 2: Some platform specific changes in iOS code

For iOS plattform, we have to open iOS project in XCode and follow these steps: Right-click on the info.plist file→ Open As → select Source Code We can see info.plist file in the XML format. We have to replace the Facebook App Id here at two places. Open AppDelegate.m and add the following lines:

<SocialLoginFacebook onResponse={onResponse} />

3. Login With LinkedIn

Step 1: Create app on LinkedIn console

Reference

https://github.com/smuxx/react-native-linkedin

go to https://developer.linkedin.com/ and create an app and by filling some details given below:

After saving the above changes, we must add an app id in AndroidManifest file.

Enter the App name, url of your linkedIn page, privacy policy url, App logo. You will see a following screen:

Copy this ClientID. It’s showing “This app is not verified as being associated with this company” You need to verify this LinkedIn Page by following 1–3 steps:

 <SocialLoginLinkedin
            clientID=""
            clientSecret=""
            redirectUri=""
            onResponse={onResponse}
          />

Step 2: Verify the App

Copy the Generate URL → Copy URL → Hit on browser It sends a verification code on your LinkedIn account.

Go to your LinkedIn account, click on Verify

After refreshing a page of linkedIn console, you will see it as a verified.

Select 2nd tab ’Auth’ and copy a Client ID and Client Secret

Step 3: Enable the LinkedIn Login option from Products list:

Now go to 3rd tab ‘Product’ and select an option Sign in with LinkedIn

Step 3: Enable the LinkedIn Login option from Products list:

npm install react-native-linkedin — save npm install react-native-webview –save cd ios && pod install && cd

<SocialLoginFacebook onResponse={onResponse} />

4. Login With Apple

Reference

https://github.com/invertase/react-native-apple-authentication

  1. Initial set-up

Import the appleAuth (API documentation) module and the AppleButton (API documentation) exported member element from the @invertase/react-native-apple-authentication library. Setup an event handler (onPress) to kick start the authentication request.

  1. Implement the login process
 <SocialLoginApple onResponse={onResponse} />

5. Login with twiter

npm install react-native-login-twitter --save

Go to Twitter Apps to create your app so that you can obtain API key and secret, note:

Remember to set a Callback Url, whatever will work By default, Twitter won't allow you to grab user's email, so you have to apply for a permission for your app to retrieve user's email

iOS

// Info.plist CFBundleURLTypes CFBundleURLSchemes twitterkit- LSApplicationQueriesSchemes twitter twitterauth

usage

 <SocialLoginTwiter onResponse={onResponse} />

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library