Skip to content
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

Convert icloud-auth to async, integrate anisette-v3 and support SMS auth #18

Merged
merged 19 commits into from
May 5, 2024

Conversation

TaeHagen
Copy link
Contributor

@TaeHagen TaeHagen commented Apr 2, 2024

Test with RUST_LOG=debug cargo test gsa_auth -- --nocapture

@polymo1 polymo1 added the enhancement New feature or request label Apr 2, 2024
Comment on lines 108 to 116
// NeedsSMS2FASent(Send2FAToDevices),
NeedsDevice2FA(),
Needs2FAVerification(),
NeedsSMS2FA(),
NeedsSMS2FAVerification(VerifyBody),
NeedsLogin(),
Failed(Error),
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would maybe add a generic NeedSecondStep(action: String) too, to handle all the other cases (along with a way to skip the second step if Apple provided all the required tokens).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a state machine, and the "Logged in" state is the finished state. Are there any other steps other than those two? I think it's better to panic now to bring attention to them if they ever show up. But I guess it could also be an error state?

icloud-auth/src/client.rs Show resolved Hide resolved
omnisette/src/remote_anisette_v3.rs Show resolved Hide resolved
Copy link
Member

@JoeMatt JoeMatt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a Rust expert but from a coding standards and PR quality standpoint, looks good to me.

@JoeMatt
Copy link
Member

JoeMatt commented Apr 27, 2024

CI failing with this though,

image

@JJTech0130
Copy link
Member

JJTech0130 commented Apr 27, 2024

CI’s always been failing iirc, that error is from the code sign library not this

@JoeMatt
Copy link
Member

JoeMatt commented Apr 27, 2024

CI’s always been failing iirc, that error is from the code sign library not this

OK, kind of assumed that. I'll make a ticket so it's noted. We should really fix that otherwise what's the point.

#[error("Missing Libraries")]
MissingLibraries,
#[error("{0}")]
Anyhow(#[from] anyhow::Error)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you end up keeping some code using anyhow?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think so, why?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So why are we keeping that case in the enum? It could allow us to remove the anyhow crate dep altogether couldn't it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image
nvmind we do 😭 not me tho

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that'll be for another PR then

@Dadoum Dadoum merged commit 311c105 into SideStore:master May 5, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants