lykmapipo / ngaa Goto Github PK
View Code? Open in Web Editor NEWDRY authentication and authorization for angular and ui-router
DRY authentication and authorization for angular and ui-router
ui-router v1.0.x is released.
Currently, All state events, (i.e. $stateChange* and friends) are deprecated and disabled by default.
https://ui-router.github.io/guide/ng1/migrate-to-1_0
Do you have any idea on the ngaa's update for Compatibility with ui-router v1.0+?
How can I deal with the situation where a user's info/profile/permissions have changed? It seems that the user json object is only received upon login.
I want to use my own signin template,
in my main module's config function:
$authProvider.signinTemplateUrl = 'ui/login.html';
but it doesn't work.
I found that the signinState is always registered before the overriding of signinTemplateUrl.
so it always requesting the default signinTemplateUrl when starting the signinState.
The only thing i can do right now is editing ngAA.js to change the default signinTemplateUrl value of ngAAConfig. Do anyone have some better idea?
It will be good to have ngAA
separated into modules that have their own responsibility
authentication
authorization
profile
etc
This will give ngAA
ability to grow and cover other user management scenarios
TypeError: ngAAUser.logout is not a function
at Object.self.$get.$auth.signout (ngAA.js:206)
Hi there ,
My configuration is
$authProvider.signinUrl = 'laravel-frontend/public/api/frontauthenticate';
$authProvider.signinState = 'login';
$authProvider.signinRoute = '/login';
$authProvider.signinTemplateUrl = 'app/shared/views/login.html';
$authProvider.afterSigninRedirectTo = 'dashboard';
$authProvider.afterSignoutRedirectTo = 'login';
so after login it goes to dashboard but then when I write '/login' then it opens login page.
How can I redirect it to dashboard if it is already looged in .
Thanks
Obtain server side authentication errors and bind them on $scope.signinError
to enable authentication errors to be displayed on the signin form
It should be able to deduce permission from array of object and not only array of string.
Hi
I want to add preloader (loading) to login pgae. What should I do? Is it a way to add controller in login page?
Hi
When I use $authProvider.signinUrl
with external url (non-localhost) like this:
$authProvider.signinUrl = 'http://example.com/public/api/authenticate';
Show me this error in console:
XMLHttpRequest cannot load http://example.com/public/api/authenticate.
Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost' is therefore not allowed access.
It would be nice to be able to support 'refresh tokens' so that a user can remain logged in for an extended/infinite period of time.
Should be able to iterate over all permission assigned to user and generate permit keys in the $rootScope
to allow:
Permit keys may follow format isPermittedTo[permission]
where permission if picked from the current assigned permissions to the user.
So if user has permission View report
then isPermittedToViewReport
will be available in $rootScope
as a permit key for view reports.
It may then used in views as:
<div ng-show="isPermittedToViewReport"></div>
Or anywhere in codes as:
if(isPermittedToViewReport){
//codes
...
}
The ability of multi login needs to be implemented.
"Previous localstorage data when replaced by the new one, the previous login should be killed or fallback to login page"
Should be able to authenticate user in more than backend server. This is useful if application are created to leverage device storage like localstorage
, indexdb
and others.
Motivations:
It should be able to used in developing desktop application which are developed in electron
and nw
.
Should be able to deduce in templates if current user
hasPermit
hasAllPermits
hasAnyPermit
Hi,
Your plugin is useful for me. Do you have plan to Angular 2.0?
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.