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

@coreo/ionic-auth

v2.1.1

Published

Ionic 2+ module for authorising a user with Coreo.

Downloads

35

Readme

@coreo/ionic-auth

Ionic 2+ module for integrating with Coreo via email/facebook/google/etc.

Installation

npm install @coreo/ionic-auth

Usage

Import the module in your app.module.ts:

import { CoreoAuthModule } from '@coreo/ionic-auth';
...
@NgModule({
    imports: [
        ...
        CoreoAuthModule
        ...
    ]
})
export class AppModule {}

Setting up OAuth providers

Facebook

  • In your Ionic project, make sure you have a widget ID setup in your config.xml file.
  • Go to https://developers.facebook.com. In the top right hand corner, hover over 'My Apps' and choose 'Add a New App'. Follow through the wizard to set up the app, don't add any products.
  • In the Facebook Dashboard, click on the 'Settings' section in the left hand menu.
  • Enter a display name, app icon and contact email address.
  • Click the 'Add Platform' button, and choose iOS. In the 'Bundle ID' section, add the widget ID from your config.xml file.
  • Click the 'Add Platform' button, and choose Android. In the 'Google Play Package Name' enter your widget ID.
  • You now need to generate an Android keystore hash. Do this with the following command: keytool -exportcert -alias <RELEASE_KEY_ALIAS> -keystore <RELEASE_KEY_PATH> | openssl sha1 -binary | openssl base64 - replacing <RELEASE_KEY_ALIAS> with your keystore alias and pointing to your <RELEASE_KEY_PATH>.
  • Under the 'Dashboard' section, copy the App ID.
  • In your ionic project, install the facebook plugin with ionic cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="123456789" --variable APP_NAME="myApplication", changing the App ID and App Name as appropriate.
  • Go to Coreo, and find the correct project. Get the project ID and set it as the projectId option in your call to CoreoModule.forRoot({}) in your app's module file.
  • Back in Coreo, go to the 'OAuth Credentials' tab. Click 'Create Credential'. Choose the 'Facebook' provider, and enter the App ID and secret from the Facebook Dashboard here.

You should now be able to use the Facebook login component.

Google

  • In your Ionic project, make sure you have a widget ID setup in your config.xml file.
  • Follow the instructions in this section: https://github.com/EddyVerbruggen/cordova-plugin-googleplus#3-google-api-setup
  • Take the reverse client ID from the resulting .plist file.
  • In your ionic project, install the plugin with ionic cordova plugin add cordova-plugin-googleplus --save --variable REVERSED_CLIENT_ID=<REVERSED_CLIENT_ID>. The REVERSED_CLIENT_ID will start with com.googleusercontent.apps.
  • Go to Coreo, and find the correct project. Get the project ID and set it as one of the options in your call to CoreoModule.forRoot({}) in your app's module file.
  • Go to the Google Developer console at https://console.developers.google.com. Make sure you have selected the correct project.
  • Click on the Credentials section on the left hand menu.
  • Under 'OAuth 2.0 client IDs', click on the 'Web client'.
  • Under the 'Authorised redirect URIs' section, add the following addresses (make sure you click Save afterwards):
    • https://coreo-dev.herokuapp.com/auth/google/callback
    • https://api.coreo.io/auth/google/callback
  • In a separate browser tab, go to Coreo. Go to the 'OAuth Credentials' tab. Click 'Create Credential'. Choose the 'Google' provider, and enter the App ID and secret from the other tab here.
  • Use the web client ID and set it as the googleWebClientId in your call to CoreoModule.forRoot({}) in your app's module file.