Skip to content

Commit 70fc4c9

Browse files
authored
Merge pull request dotnet-architecture#156 from dotnet/idsvr-new-config
Idsvr new config
2 parents be440a9 + d00588a commit 70fc4c9

5 files changed

Lines changed: 5 additions & 1 deletion

File tree

docker-compose.override.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ services:
3333
- ASPNETCORE_ENVIRONMENT=Development
3434
- ASPNETCORE_URLS=http://0.0.0.0:5105
3535
- SpaClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5104
36+
- XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback #localhost do not work for UWP login, so we have to use "external" IP always
3637
- ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
3738
- MvcClient=http://${ESHOP_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your local dev-machine firewall at range 5100-5105.
3839
ports:

docker-compose.prod.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ services:
3838
- SpaClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5104
3939
- ConnectionStrings__DefaultConnection=Server=sql.data;Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=sa;Password=Pass@word
4040
- MvcClient=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5100 #Local: You need to open your host's firewall at range 5100-5105.
41+
- XamarinCallback=http://${ESHOP_PROD_EXTERNAL_DNS_NAME_OR_IP}:5105/xamarincallback
4142
ports:
4243
- "5105:5105"
4344

src/Services/Identity/Identity.API/Configuration/Config.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static IEnumerable<Client> GetClients(Dictionary<string,string> clientsUr
5959
ClientName = "eShop Xamarin OpenId Client",
6060
AllowedGrantTypes = GrantTypes.Implicit,
6161
AllowAccessTokensViaBrowser = true,
62-
RedirectUris = { "http://eshopxamarin/callback.html" },
62+
RedirectUris = { clientsUrl["Xamarin"] },
6363
RequireConsent = false,
6464
PostLogoutRedirectUris = { "http://13.88.8.119:5105/Account/Redirecting", "http://10.6.1.234:5105/Account/Redirecting" },
6565
AllowedCorsOrigins = { "http://eshopxamarin" },

src/Services/Identity/Identity.API/Startup.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public void ConfigureServices(IServiceCollection services)
7373
Dictionary<string, string> clientUrls = new Dictionary<string, string>();
7474
clientUrls.Add("Mvc", Configuration.GetValue<string>("MvcClient"));
7575
clientUrls.Add("Spa", Configuration.GetValue<string>("SpaClient"));
76+
clientUrls.Add("Xamarin", Configuration.GetValue<string>("XamarinCallback"));
7677

7778
// Adds IdentityServer
7879
services.AddIdentityServer(x => x.IssuerUri = "null")

src/Services/Identity/Identity.API/appsettings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
},
55
"MvcClient": "http://localhost:5100",
66
"SpaClient": "http://localhost:5104",
7+
"XamarinCallback": "http://localhost:5105/xamarincallback",
78
"Logging": {
89
"IncludeScopes": false,
910
"LogLevel": {

0 commit comments

Comments
 (0)