GithubHelp home page GithubHelp logo

auth0-ionic2's Introduction

Deprecation Notice

These samples have been deprecated. Please see the new Auth0 + Ionic 2 samples here.

auth0-ionic2's People

Contributors

ashishtilara avatar chenkie avatar getglad avatar jerriep avatar ntotten avatar oliviercherrier avatar sh4ka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auth0-ionic2's Issues

Error: Uncaught (in promise): TypeError: Cannot read property 'split' of null on "startupTokenRefresh()"

Hello, I'm trying to Implement Refresh Tokens on an Ionic 2 application using Auth 0 guide.
But I receive the following error when try to access the application after I close it (without logging out):
Error: Uncaught (in promise): TypeError: Cannot read property 'split' of null
Therefore, I believe the error happens in startupTokenRefresh().

ionic info output:
Cordova CLI: 6.3.0
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.19
OS:
Node Version: v4.4.5

CustomURLScheme adding Issue

This may be related to the ionic-cli issue #2305

In the Auth0 Getting started is says to run:

ionic cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_HOST=hungerperks.auth0.com --variable ANDROID_PATHPREFIX=/cordova/{YOUR_PACKAGE_ID}/callback

Since ionic cordova is currently broken I ran

cordova plugin add cordova-plugin-customurlscheme --variable URL_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_HOST=hungerperks.auth0.com --variable ANDROID_PATHPREFIX=/cordova/{YOUR_PACKAGE_ID}/callback

and

ionic plugin add cordova-plugin-customurlscheme --variable URL_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_SCHEME={YOUR_PACKAGE_ID} --variable ANDROID_HOST=hungerperks.auth0.com --variable ANDROID_PATHPREFIX=/cordova/{YOUR_PACKAGE_ID}/callback

both resulted in an unknown url scheme error from chrome after the 'login' or 'signup' button is pushed.

Lost margin-top: 56px when successfully lock in redirect...

So there is also a display problem. When I successfully locked in, I set rootPage to Home page. But the scroll-content does not have margin-top: 56px added in the style to make sure my content will not attached under the header. When I go to other view and come back, the margin-top will get added. So it is only happen after redirect from Auth0 lock. Do you know why?

So since I can not listen to a promise with my login call in Lock V10. Now my strategy (not sure if it is right), is to use this code in my login.ts constructor:

 `this.auth.lock.on('authenticated', authResult => {
    console.log("Authenticated Successfully!");
    his.nav.setRoot(HomePage);
  });`

So the login button only do lock.show(). That is the only different I have from your Tutorial codes as your tutorial login and content are all in a same page.

iOS Emulator Crash/Freeze

Hello,

I built my app based off of this example so first of all thank you for this. It is a great example and works very well via ionic serve. However, I recently noticed that when i go to run the iOS emulator against my app that it crashes. As a test I came back here recloned, ran a npm install, and then built the app after installing the iOS platform. When I run emulate for iOS the app freezes immediately. Any ideas on this? Have you tried this project in an iOS emulator? Perhaps its something wrong locally or even a cordova/ionic2 issue. I'm doing some more research for what is causing the issue as well. If I find it I will let you know. Reviewing system logs now.

doesn't work

After following by readme.md and changing keys, i've run ionic serve and got this:
image

Lock 10 problem for my app and how to solve it?!?!

Just follow this guide and there are some issues:
This new tutorial makes my app not working correctly any more.

First, the login() function do not return as a promise. Which my app is waiting for the resolve to setRoot to a Home page from login page (where the Auth0 are called). It is not gonna work on this new tutorial.

Second, I can not dynamic set the connections with this.lock.show({options}). The lock.show ignores all the options and I can not set the display of lock dynamically anymore since V10. My app is, before popup the Lock, I let users pick what kind of user they are , then show related SSO login depend on the value they choose. For users are business, I show Email/PW login ONLY. For users pick YouTube Creator, I will need google SSO with YouTube scope. But since the lock is initialized during the login constructor, I can not update the login option based on user choices.

With this new tutorial using V10 Lock, how would I dynamically set the allowedConnections?

Thanks!!

UNMET PEER DEPENDENCY

Hi @chenkie ,

I am experimenting with Auth0 and Ionic 2: thank you for the project!

Unfortunately, I have a problem installing it after running npm install:

...
UNMET PEER DEPENDENCY @angular/core@^2.0.0-rc.1
UNMET PEER DEPENDENCY @angular/http@^2.0.0-rc.1
...
UNMET PEER DEPENDENCY [email protected]
...
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN [email protected] requires a peer of @angular/core@^2.0.0-rc.1 but none was installed.
npm WARN [email protected] requires a peer of @angular/http@^2.0.0-rc.1 but none was installed.
npm WARN [email protected] requires a peer of [email protected] but none was installed.
npm WARN auth0-ionic2.dev@ No repository field.
npm WARN auth0-ionic2.dev@ No license field.

Me environment:

$ node -v
v6.0.0

$ npm -v
3.8.8

$ cordova -v
6.1.1

$ ionic -v
2.0.0-beta.25

$ tsc --v
Version 1.8.10

$ typings -v
0.8.1

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 14.04 LTS
Release:    14.04
Codename:   trusty

Please see this log for details: npm-install-log.txt

I also tried this tutorial: https://auth0.com/docs/quickstart/hybrid/ionic2/no-api with this example: https://github.com/auth0/auth0-ionic/tree/master/examples/ionic2-auth0-sample (which does not work https://github.com/auth0/auth0-ionic/issues/37)

I think the documentation should be switched to your repository for Ionic 2: https://github.com/auth0/auth0-ionic2

Thank you for your help in advance!

Back button doesn't work after login (ex fb)

How to reproduce:

  • go to app
  • login via fb
  • try back button (even after switching apps and navigating through the tabs)

If I forcefully close it and open it again, it will work, and the user will be logged in.

How to Unit Test this?

Hi I want to test this. But getting:

ORIGINAL EXCEPTION: ReferenceError: Auth0Lock is not defined

Is there a possibility to mock Auth0Lock which is declared in my service as by best practice?

Upgrade to Ionic2 RC0

I tried for an hour to port this package to Ionic2 RC0 but no lucky. It give's me this error:

ORIGINAL EXCEPTION: Auth0 is not defined

I suppose that this error is related to this lines:

// Avoid name not found warnings
declare var Auth0: any;
declare var Auth0Lock: any;

But I don't know how to solve it. Anyone has an idea?

cannot get it to run, keeps on throwing errors

I am getting following error, also with new ionic cli, it can't find gulpfile.js, so ionic serve doesn't work straightaway.

app/theme/app.ios.scss
Error: File to import not found or unreadable: ionic.ios
       Parent style sheet: stdin
        on line 20 of stdin
>> @import 'ionic.ios';
   ^

Is it possible to get this example in non-ts version, I mean in ES2015.

cheers

Hanging on Ionic Serve

I cloned the repo, ran npm install and when I run ionic serve it completes the "HTML copied to www/build" step and then just hangs. Looking at the Activity Monitor I can see that Ionic is spiking up to 99.9% of my CPU.

FYI - I was able to use the code in this repo to get auth0 running in my app, I just couldn't actually run the demo itself. I don't need it, I was just creating this issue to give you a heads up in case someone else encounters this.

App crashes on "Sign Up"

Hi,

I am using Android 5.0.2. When I go to Lock Widget -> Sign Up - the app crashes after successful sign up.

I partly solved it by adding inappbrowser plugin:
ionic plugin add cordova-plugin-inappbrowser

But, now after sign up the inappbrowser is not being closed and stays on about:blank page - it needs to be closed automatically.

I tried the latest lock as well: https://cdn.auth0.com/js/lock-9.2.min.js - does not work.

npm install fails

$ npm install
npm WARN package.json ionic-auth@ No repository field.
npm WARN package.json ionic-auth@ No license field.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\bin\npm-cli.js" "install"
npm ERR! node v4.3.0
npm ERR! npm v2.14.12
npm ERR! code EPEERINVALID

npm ERR! peerinvalid The package [email protected] does not satisfy its siblings' peerDependencies requirements!
npm ERR! peerinvalid Peer [email protected] wants zone.js@^0.6.4

Being such a noob to npm, I'm still trying to solve this problem. Any ideas? I've tried to change the version of zone.js in my package.json and looking at my node_modules directory I see that the version 0.6.4 is installed.

not working with ionic2 beta 11

I am using Ionic2 beta 11, Angular2 rc 4.
but I am getting this error:
node_modules/angular2-jwt/angular2-jwt.ts:1 import { provide, Injectable } from '@angular/core'; ^ ParseError: 'import' and 'export' may appear only with 'sourceType: module'

Example using my own login screen

i would love an example of how to use this with my own username and password fields if possible? Not using the pop up lock screen

Doesn't work with ionic beta.10

changes to the use of ionicBootstrap seem to cause problems.. as well as provider issues... fixed most of them, but now all i get is it hanging on load with a pending request to badge.png... no idea where to go from here.

assuming it should be as simple as
ionicBootstrap(MyApp, [ HTTP_PROVIDERS, AUTH_PROVIDERS, AuthService ]);
when all is said and done, but i think all the betas and rc not gelling well at the moment

Relogin problems

using the Lock 10 version... when i log in a second time and am presented with the "Last time you logged in with" screen, this does not seem to work.. pops open to another screen showing the old lock? maybe from the auth0 site? which never authenticates.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.