Angular-auth-oidc-client: startup_route -> post_login_route?

Created on 16 Oct 2017  路  11Comments  路  Source: damienbod/angular-auth-oidc-client

Suggestion 1: to rename startup_route to login_route (the one called after a successful _login_).

Suggestion 2: to add a logout_route (to be called after a successful _logout_).

Also, the default value /dataeventrecords/list is not very useful (except for the sample apps 馃槈 ). What about to use '/' for both login and logout?

breaking_changes enhancement

All 11 comments

Hi @fdcastel the renaming sounds good. Do you want to create a pull request? Otherwise I will do it. Thanks. This would be a breaking change, so I will merge it with the release of the HTTP client update, Angular 5 release :)

Suggestion 2 and 3 tip top as well.

Greetings Damien

Sure. It'll be a pleasure! 馃槃

Hi @fdcastel I had a few problems improvements with the PR whils testing.
I have created a branch where we can test and finish the changes.

https://github.com/damienbod/angular-auth-oidc-client/tree/dev_fdcastel

  • I renamed the login_route to post_login_route
  • The isAuthorized event is required, because some users of the lib don't use the userData in this way, auto_userData
  • I'm not certain the logout is required, we already have a post_logout_uri, need to think about this
  • I'm testing this branch now (weekend) and plan the merge then

Thanks fpr the PR.

Greetings Damien

@robisim74 @FabianGosebrink Any opinions?

Also I will merge the commit from @robisim74, I reset the master to the last released version until this is fixed

Ops... @damienbod I had not noticed the revert, and I re-made the push of the last commits... Please, revert again.

  • Ok for post_login_route, logout_route seems a duplicate
  • Ok for keeping isAuthorized

About _post_login_route_, a method would be useful to change it at runtime, and then be able to return to the page requested by the user.

@robisim74 This is possible, the post_login_route is a default route if you're not using the return to page request feature.

https://github.com/damienbod/angular-auth-oidc-client/blob/master/API_DOCUMENTATION.md#trigger_authorization_result_event

trigger_authorization_result_event, right.

I renamed the login_route to post_login_route
馃憤

I'm not certain the logout is required, we already have a post_logout_uri, need to think about this

My fault. Really post_logout_redirect_uri does the job (called from STS server).

I completely ignored it and implemented the "post_logout_route" on Angular client. That's why I suggested it. It should be removed. 馃憤

I'm testing this branch now (weekend) and plan the merge then

Maybe I'll hit a nerve here. Please don't get me wrong 馃槄. But we really should have a set of automated tests for the project.

I know you have a large expertise in this area (I follow your blog for years 馃挴). But it's crucial to translate this knowledge into reproducible test cases sooner or later.

As always, I'm more than willing to help. If you could write down a set of test cases (even in plain english) I could start something in this area. And this weekend seems a perfect moment for this 馃槈 . Just write what you do for the tests and what you check. It will be a perfect starting point for me.

@fdcastel thanks, yes you're right, this lib really does need tests.

fixed in version 2.0.0

Was this page helpful?
0 / 5 - 0 ratings