1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-05 18:13:36 +00:00

Client & Version headers (#1757)

This commit is contained in:
Oscar Hinton
2022-02-08 17:43:40 +01:00
committed by GitHub
parent 10fafaf8c8
commit 427ff09af0
5 changed files with 48 additions and 6 deletions

View File

@@ -116,7 +116,7 @@ namespace Bit.App.Pages
var redirectUri = "bitwarden://sso-callback";
var url = _apiService.IdentityBaseUrl + "/connect/authorize?" +
"client_id=" + _platformUtilsService.IdentityClientId + "&" +
"client_id=" + _platformUtilsService.GetClientType().GetString() + "&" +
"redirect_uri=" + Uri.EscapeDataString(redirectUri) + "&" +
"response_type=code&scope=api%20offline_access&" +
"state=" + state + "&code_challenge=" + codeChallenge + "&" +

View File

@@ -5,6 +5,7 @@ using Bit.App.Abstractions;
using Bit.App.Models;
using Bit.App.Resources;
using Bit.Core.Abstractions;
using Bit.Core.Enums;
using Plugin.Fingerprint;
using Plugin.Fingerprint.Abstractions;
using Xamarin.Essentials;
@@ -35,8 +36,6 @@ namespace Bit.App.Services
_broadcasterService = broadcasterService;
}
public string IdentityClientId => "mobile";
public void Init()
{
_broadcasterService.Subscribe(nameof(MobilePlatformUtilsService), (message) =>
@@ -80,6 +79,11 @@ namespace Bit.App.Services
return DeviceInfo.Model;
}
public ClientType GetClientType()
{
return ClientType.Mobile;
}
public bool IsViewOpen()
{
return false;