These samples have been deprecated. Please see the auth0-angular-samples repo for the latest Auth0 and Angular 2+ integration samples.
auth0-angularjs2-systemjs-sample's Introduction
auth0-angularjs2-systemjs-sample's People
Forkers
juancarlosmaldonadobeltran sebastiaan-de-vries ovejohansson austinedeveloper luap tbowler jamesamuir geoffreygraddy deadcee teguhekky casaaga tigerigs littlebigjuko jawilson1947 cedwa nickbenes walaash theoryofweb iyinoluwaayoola sabues sammcafee ankurpatel18 jdiss alexjpujol jwg666 kpl39 goodmanforweb ahmadafuni machuanjia valeriyradchenko evenkeeler tttimmusgrove utnas ashishdasnurkar sami-mania albertoguerere xampany thexande stefanvitz b4youleap vmartynets amaanc kaytv rapelt peterblazejewicz t301000 chandandas ksharpdabu yernvoon opnarius kfukue smacheng mandpd gwooding rubythonode mrtortoise krisklosterman matthieu-vincke incubator241 ehnajafi bcrigler anubhavnpa choui sjoerdapp willylu326 awwong1 edgarhsalinas drane psaussure aurgo stanly65 glitchbane anushamc michaelgermini apt-get2update ecabello shelphen bryandelfincpe shikhartanwar annyv2 tomtobac lisaiceland trung85 jayhartley juancho85 sarangraj gurungbinod rezonjov chicagozer dndodd stefanruijsenaars geminiyellow katherinel thu2004 springyboy tenaciousras simonaco nathanpen benorman partportauth0-angularjs2-systemjs-sample's Issues
npm start 01-Login (Samples)
When npm start look this , Help please
npm ERR! Linux 4.4.0-45-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "start"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: tsc && concurrently "tsc -w" "lite-server"
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the [email protected] start script 'tsc && concurrently "tsc -w" "lite-server" '.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the angular2-quickstart package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! tsc && concurrently "tsc -w" "lite-server"
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs angular2-quickstart
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls angular2-quickstart
npm ERR! There is likely additional logging output above.
could i use SystemJS import Auth0Lock ?
i try to use SystemJS to import auth0-lock, but alway got this error:
EXCEPTION: Error in :0:0 caused by: Auth0Lock is not defined
i knew this sample use <script src="http://cdn.auth0.com/js/lock/10.7/lock.min.js"></script>
to load the Auth0Lock
, but is there anybody can tell me how to import it by SystemJS?
Google Custom Login not working
I am currently working on a webpage with a Google Custom Login on it. However, when you click the button a tab opens up that says:
- That’s an error.
What is the problem?
This is my webpage so far.
02-Custom login - "Login with google" not work
Login with credentials work correctly, buy if we push "Login with google" - no token set and we return to home page.
But when use 01-Login, and auth with "Lock" at same computer and auth.config.ts file - login with google work.
Upd: public handleAuthentication() not return error, because this.auth0.parseHash((err, authResult) => authResult is undefined.
In 'err' we see next:
Object
{ error: "invalid_token"
errorDescription: "Algorithm HS256 is not supported. (Expected algs: [RS256])" }
HS256 is enabled in advanced options by default...
Response to preflight request doesn't pass access control check
Full error:
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
I am adding auth0 tio my sails angular web app. I have the output of the login component however when i try to login i get this error.
Thanks,
JWT must have 3 parts
I cannot figure out how to fix this error:
Error in ./AppComponent class AppComponent - inline template:10:45 caused by: JWT must have 3 parts
error_handler.js:53Error: JWT must have 3 parts at JwtHelper.decodeToken (angular2-jwt.js:202) at JwtHelper.getTokenExpirationDate (angular2-jwt.js:212) at JwtHelper.isTokenExpired (angular2-jwt.js:221) at tokenNotExpired (angular2-jwt.js:240) at Auth.authenticated (auth.service.ts:27) at _View_AppComponent0.detectChangesInternal (component.ngfactory.js:207) at _View_AppComponent0.AppView.detectChanges (view.js:219) at _View_AppComponent0.DebugAppView.detectChanges (view.js:324) at _View_AppComponent_Host0.AppView.detectViewChildrenChanges (view.js:245) at _View_AppComponent_Host0.detectChangesInternal (host.ngfactory.js:39)
I am using angular 2 and have made sure my app.component.ts / auth.service.ts / appt.module.ts / index.html
match the files here
System Requirements Angular 2.0.1, why the demo code using @angular/core": "2.0.0" ?
System Requirements Angular 2.0.1
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/router": "3.0.0",
"@angular/upgrade": "2.0.0",
"angular2-in-memory-web-api": "^0.0.20",
"angular2-jwt": "^0.1.25",
Template HTML not loading after authentication
Here is my auth service code.
import { Injectable } from '@angular/core';
import { tokenNotExpired } from 'angular2-jwt';
import { myConfig } from '../auth0.config';
import { Router } from '@angular/router'
// Avoid name not found warnings
declare var Auth0Lock: any;
@Injectable()
export class Auth {
// Configure Auth0
lock = new Auth0Lock(ClientID,DomainName, {
auth: {
redirectUrl: 'http://localhost:4200/server-auth',
responseType: 'token',
params: {
state: 'mologin'
}
}
});
constructor(private router: Router) {
// Add callback for lock `authenticated` event
this.lock.on('authenticated', (authResult) => {
setTimeout(localStorage.setItem('id_token', authResult.idToken), 200);
this.router.navigate(['/emails'])
});
}
public login() {
// Call the show method to display the widget.
this.lock.show();
};
public authenticated() {
// Check if there's an unexpired JWT
// It searches for an item in localStorage with key == 'id_token'
return tokenNotExpired();
};
public logout() {
// Remove token from localStorage
localStorage.removeItem('id_token');
};
}
On successful routing I'm navigating to my emails page. The email component gets loaded. Its constructor and onInit methods ae called successfully. But the html doesn't gets displayed. Facing this issue on chrome. Working fine on firefox.
Update samples to Lock v10.rc.2
All samples should be updated to use Lock v10.rc.2 .
Unused function setUser
In 02-Custom-Login/app/auth.service.ts there is a function setUser. It is private and not used anywhere.
Encounter problems installing dependencies
Samples should use auth0-variables.js
Our quickstart samples don't run directly by using values from auth0-variables.js
(which is auto-generated for logged in users on the website).
I'll work on a PR to fix this in the coming days.
Single Page App Angular.js 2 Testing - Lock
In Angular 2 SPA:
Ticket AUTH - 3348
How to use useHash flag for callback returns after login from Auth0 dialog
Angular 2 style guide
I suggest that you use the style guide given by angular.io (specially for the naming convention) for this simples. This will be easier to understand.
06-rules user credentials
06-Rules have somebody's credentials
With RC5 the authenticated event is not received
Updating to RC% like so:
"@angular/common": "2.0.0-rc.5",
"@angular/compiler": "2.0.0-rc.5",
"@angular/core": "2.0.0-rc.5",
"@angular/forms": "0.3.0",
"@angular/http": "2.0.0-rc.5",
"@angular/platform-browser": "2.0.0-rc.5",
"@angular/platform-browser-dynamic": "2.0.0-rc.5",
"@angular/router": "3.0.0-rc.1",
and also to lock v 10.2.0 the authenticated event does not get fired after calling lock.show and logging in
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.