Base solution for your next web application

Activities of "mdepouw"

version: Angular version of Zero using QueryStringTenantResolver

Is there a set of API(s) I can call to switch a user from one tenant to another? I reviewed the behavior of linked accounts and tried doing something similar by calling Logout() but I'm having trouble if I call Logout() on a user that is not logged in as that issues a 302 (on a ajax call). I also have trouble calling Logout() if the user's token has expired.

Use case:

  1. user A logins into tenant X
  2. user A then clicks a link for another tenant Y

Current working solution In AppPreBootstrap.ts I'm checking for a specific query parameter to trigger:

abp.auth.clearRefreshToken();
abp.auth.clearToken();
AppPreBootstrap.resolveTenancyName(AppConsts.appBaseUrlFormat);
location.href = AppConsts.appBaseUrlFormat;

In the login page, I'm automatically redirecting to the IDP which recognizes the user is already signed in & returns back to our app

In this solution, I'm not calling Logout() on the server. Are there any potential problems you see by not calling it?

Alternative solution: call Logout() in AppPreBootstrap.ts

  1. How can I determine if the user is currently logged-in so I can only call Logout() when they are
  2. How can I determine if the token is expired?

I assume both of those would involve reading some values from session storage?

Thanks!

I've seen a few links like this now:

source

bad link: https://github.com/aspnetboilerplate/aspnetboilerplate/issues/1858%22%3Ehttps://github.com/aspnetboilerplate/as

I'm confused as to why we don't have access to the source code for Abp.AspNetZeroCore.Web. Shouldn't that source be available in one of the private repo's in https://github.com/aspnetzero? If we have an active license don't we have access to the source code?

What am I misunderstanding?


reference other posts about this topic:

https://support.aspnetzero.com/QA/Questions/4571#answer-86b1a766-de44-49d6-aa29-fa0f014f9e5d

yeah this package is closed source due to licensing purposes.

and https://support.aspnetzero.com/QA/Questions/8511/Access-to-the-AbpAspNetZeroCoreWeb

Is there a way to configure multiple OpenID Connect providers out the box?

reference: Authentication configuration:

{
  "Authentication": {
    "AllowSocialLoginSettingsPerTenant": false,
    "Facebook": {
      "IsEnabled": "false",
      "AppId": "",
      "AppSecret": ""
    },
    "Twitter": {
      "IsEnabled": "false",
      "ApiKey": "",
      "ApiKeySecret": ""
    },
    "Google": {
      "IsEnabled": "false",
      "ClientId": "",
      "ClientSecret": "",
      "UserInfoEndpoint": "https://www.googleapis.com/oauth2/v2/userinfo"
    },
    "Microsoft": {
      "IsEnabled": "false",
      "ConsumerKey": "",
      "ConsumerSecret": ""
    },
    "OpenId": {
      "IsEnabled": "true",
      "ClientId": "4fb5e652-dc58-4370-95ca-fdfb3ba46273",
      "Authority": "https://spottedmahnb2c.b2clogin.com/spottedmahnb2c.onmicrosoft.com/B2C_1_BlahNewFormat/v2.0/",
      "Issuer": "https://spottedmahnb2c.b2clogin.com/80033dfd-6eab-42c4-bdf2-4e223d4b396f/v2.0/",
      "LoginUrl": "https://spottedmahnb2c.b2clogin.com/spottedmahnb2c.onmicrosoft.com/B2C_1_BlahNewFormat/oauth2/v2.0/authorize",
      "ValidateIssuer": "true",
      "ResponseType": "id_token",
      "ClaimsMapping": [{
          "claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier",
          "key": "name"
        }, {
          "claim": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
          "key": "emails"
        }
      ]
    },
    "WsFederation": {
      "IsEnabled": "false",
      "Authority": "",
      "ClientId": "",
      "Tenant": "",
      "MetaDataAddress": ""
    },
    "JwtBearer": {
      "IsEnabled": "true",
      "SecurityKey": "DemoProjectDemo_blah",
      "Issuer": "DemoProjectDemo",
      "Audience": "DemoProjectDemo"
    }
  }
}
Showing 1 to 4 of 4 entries