Skip to content

SRE-2330 cleanup references to auth-email #286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions crates/bitwarden-core/src/auth/api/request/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ async fn send_identity_connect_request(
request = request.header(reqwest::header::USER_AGENT, user_agent.clone());
}

if let Some(email) = email {
request = request.header("Auth-Email", URL_SAFE_NO_PAD.encode(email.as_bytes()));
}

let response = request
.body(serde_qs::to_string(&body).expect("Serialize should be infallible"))
.send()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,6 @@ class MainActivity : FragmentActivity() {

val loginBody = http.post(IDENTITY_URL + "connect/token") {
contentType(ContentType.Application.Json)
header("Auth-Email", Base64.getEncoder().encodeToString(EMAIL.toByteArray()))
setBody(FormDataContent(Parameters.build {
append("scope", "api offline_access")
append("client_id", "web")
Expand Down
8 changes: 1 addition & 7 deletions crates/bitwarden-uniffi/swift/iOS/App/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,7 @@ struct ContentView: View {
let (loginDataJson, _) = try await http.data(
for: request(
method: "POST", url: IDENTITY_URL + "connect/token",
fn: { r in
r.setValue(
EMAIL.data(using: .utf8)?.base64EncodedString(),
forHTTPHeaderField: "Auth-Email")
r.setValue(
"application/x-www-form-urlencoded", forHTTPHeaderField: "Content-Type")

fn: {
var comp = URLComponents()
comp.queryItems = [
URLQueryItem(name: "scope", value: "api offline_access"),
Expand Down
Loading