Skip to content

Commit 0fce586

Browse files
Remove old google sign-in implementation. (#3449)
* Remove old google sign-in implementation. * Remove old google sign-in implementation. * 🤖 cargo-fmt auto-update * Remove old google sign-in implementation. * Remove old google sign-in implementation. * Adjust config test to test correct config value. * Fix archive config integration test * Remove unused method. --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 4ad37c5 commit 0fce586

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+121
-3015
lines changed

src/frontend/src/lib/flows/authLastUsedFlow.svelte.ts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@ import {
88
lastUsedIdentitiesStore,
99
type LastUsedIdentity,
1010
} from "$lib/stores/last-used-identities.store";
11-
import {
12-
createGoogleRequestConfig,
13-
findConfig,
14-
isOpenIdConfig,
15-
requestJWT,
16-
} from "$lib/utils/openID";
11+
import { findConfig, requestJWT } from "$lib/utils/openID";
1712
import { get } from "svelte/store";
1813
import { sessionStore } from "$lib/stores/session.store";
1914
import { isNullish } from "@dfinity/utils";
@@ -67,15 +62,13 @@ export class AuthLastUsedFlow {
6762
"OpenID authentication is not available for this account.",
6863
);
6964
}
70-
const requestConfig = isOpenIdConfig(config)
71-
? {
72-
issuer,
73-
clientId: config.client_id,
74-
configURL: config.fedcm_uri[0],
75-
authURL: config.auth_uri,
76-
authScope: config.auth_scope.join(" "),
77-
}
78-
: createGoogleRequestConfig(config.client_id);
65+
const requestConfig = {
66+
issuer,
67+
clientId: config.client_id,
68+
configURL: config.fedcm_uri[0],
69+
authURL: config.auth_uri,
70+
authScope: config.auth_scope.join(" "),
71+
};
7972
const jwt = await requestJWT(requestConfig, {
8073
nonce: get(sessionStore).nonce,
8174
mediation: "optional",
@@ -90,7 +83,7 @@ export class AuthLastUsedFlow {
9083
await authenticationStore.set({ identity, identityNumber });
9184
lastUsedIdentitiesStore.addLastUsedIdentity(lastUsedIdentity);
9285
authenticationV2Funnel.addProperties({
93-
provider: isOpenIdConfig(config) ? config.name : "Google",
86+
provider: config.name,
9487
});
9588
authenticationV2Funnel.trigger(AuthenticationV2Events.ContinueAsOpenID);
9689
} else {

src/frontend/src/lib/generated/internet_identity_idl.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export const idlFactory = ({ IDL }) => {
22
const MetadataMap = IDL.Rec();
33
const MetadataMapV2 = IDL.Rec();
4-
const GoogleOpenIdConfig = IDL.Record({ 'client_id' : IDL.Text });
54
const ArchiveConfig = IDL.Record({
65
'polling_interval_ns' : IDL.Nat64,
76
'entries_buffer_limit' : IDL.Nat64,
@@ -47,7 +46,6 @@ export const idlFactory = ({ IDL }) => {
4746
});
4847
const InternetIdentityInit = IDL.Record({
4948
'fetch_root_key' : IDL.Opt(IDL.Bool),
50-
'openid_google' : IDL.Opt(IDL.Opt(GoogleOpenIdConfig)),
5149
'is_production' : IDL.Opt(IDL.Bool),
5250
'enable_dapps_explorer' : IDL.Opt(IDL.Bool),
5351
'assigned_user_number_range' : IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
@@ -829,7 +827,6 @@ export const idlFactory = ({ IDL }) => {
829827
});
830828
};
831829
export const init = ({ IDL }) => {
832-
const GoogleOpenIdConfig = IDL.Record({ 'client_id' : IDL.Text });
833830
const ArchiveConfig = IDL.Record({
834831
'polling_interval_ns' : IDL.Nat64,
835832
'entries_buffer_limit' : IDL.Nat64,
@@ -875,7 +872,6 @@ export const init = ({ IDL }) => {
875872
});
876873
const InternetIdentityInit = IDL.Record({
877874
'fetch_root_key' : IDL.Opt(IDL.Bool),
878-
'openid_google' : IDL.Opt(IDL.Opt(GoogleOpenIdConfig)),
879875
'is_production' : IDL.Opt(IDL.Bool),
880876
'enable_dapps_explorer' : IDL.Opt(IDL.Bool),
881877
'assigned_user_number_range' : IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),

src/frontend/src/lib/generated/internet_identity_types.d.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,6 @@ export interface GetIdAliasRequest {
455455
'relying_party' : FrontendHostname,
456456
'identity_number' : IdentityNumber,
457457
}
458-
export interface GoogleOpenIdConfig { 'client_id' : string }
459458
export type HeaderField = [string, string];
460459
export interface HttpRequest {
461460
'url' : string,
@@ -636,18 +635,14 @@ export type IdentityPropertiesReplaceError = {
636635
* Each field is wrapped is `opt` to indicate whether the field should
637636
* keep the previous value or update to a new value (e.g. `null` keeps the previous value).
638637
*
639-
* Some fields, like `openid_google`, have an additional nested `opt`, this indicates
638+
* Some fields, like `analytics_config`, have an additional nested `opt`, this indicates
640639
* enable/disable status (e.g. `opt null` disables a feature while `null` leaves it untouched).
641640
*/
642641
export interface InternetIdentityInit {
643642
/**
644643
* Configuration to fetch root key or not from frontend assets
645644
*/
646645
'fetch_root_key' : [] | [boolean],
647-
/**
648-
* Configuration for OpenID Google client
649-
*/
650-
'openid_google' : [] | [[] | [GoogleOpenIdConfig]],
651646
/**
652647
* Configuration to set the canister as production mode.
653648
* For now, this is used only to show or hide the banner.

src/frontend/src/lib/legacy/flows/manage/confirmUnlinkAccount.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/frontend/src/lib/legacy/flows/manage/confirmUnlinkAccount.ts

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)