Skip to content

habiba1997/Nativescript-Angular-Login_Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Login

Open command line :

git clone https://github.com/habiba1997/Nativescript-Angular-Projects.git

Facebook:

For logging in with your Facebook account, you should have a Facebook developer account. If you don't have one yet, you can get one here .

  1. Go to https://developers.facebook.com/apps and create a new app
  2. If you see the Product Setup page, select Facebook login
  3. Make sure to turn ON the option "Embedded Browser OAuth Login" and Click Save
  4. Copy the App ID and the App Secret from the Dashboard page to bootstrap your app. These will be the ClientID and ClientSecret respectively.

Steps to run project

  1. Open Facebook project folder in your IDE
  2. Open command line and write "npm install" to install packages in package.json file
  3. Open src >> app >> authProviderHelper.ts
  4. Enter Your ClientID and ClientSecret in configureOAuthProviderFacebook Function
  5. Run application by: "tns run android" in command line

GooglePlus:

For logging in with your Google account, you should have a Google developer account. If you don't have one yet, you can get one here .

Register your mobile app by following the wizard in the Developer Console.

Steps to run project

  1. Open GooglePlus project folder in your IDE
  2. Open command line and write "npm install" to install packages in package.json file
  3. Open src >> app >> authProviderHelper.ts
  4. Enter Your clientId of your google developer project in configureOAuthProviderGoogle Function
  5. Enter redirectUri and urlScheme by reversing clientID as in this example:

    clientId: "932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb.apps.googleusercontent.com",

    redirectUri: "com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb:/auth",

    urlScheme: "com.googleusercontent.apps.932931520457-buv2dnhgo7jjjjv5fckqltn367psbrlb",

  6. Open App_Resources/Android/src/main/AndroidManifest.xml And in "com.tns.NativeScriptActivity" activity add this intent-filter:
    <intent-filter>
    	<action android:name="android.intent.action.VIEW"/>
    	<category android:name="android.intent.category.DEFAULT" />
    	<category android:name="android.intent.category.BROWSABLE" />
    	<data android:scheme="Enter-urlScheme-from-auth-providers-folder"/>
    </intent-filter>
    
  7. Run application by: "tns run android" in command line

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors