Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

PhoneAuthProvider improvement for ios #528

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

Merged
nbransby merged 6 commits into GitLiveApp:master from kiiskristo:master
Jun 15, 2024
Merged

Conversation

@kiiskristo
Copy link

@kiiskristo kiiskristo commented Jun 10, 2024

FIRAuthUIDelegateProtocol is not available outside of the firebase-kotlin-sdk library, so there is no way to inject PhoneVerificationProvider to verifyPhoneNumber method. That makes PhoneAuthProvider impossible to use on IOS platform.

...brary, so there is no point to use it in PhoneVerificationProvider
Copy link
Author

I could also update this PR to just have FIRAuthUIDelegateProtocol as optional and have less changes in code:
val delegate: FIRAuthUIDelegateProtocol?

Instead of:
val delegate: Any?

That UIDelegate is mostly for viewcontroller based architecture and most of people use SwiftUI nowadays.

Copy link
Contributor

Im not a maintainer or anything on this project but isnt is better to add an interface that has the same functions the delegate has? Then you can use that type for the delegate variable and can create a wrapper class for the custom delegate class here that will automatically call the underlying firebase delegate itself.

Just sharing my idea here, this may turn out to be harder than i explain so take it with a grain of salt :)

Copy link
Contributor

Daeda88 commented Jun 11, 2024
edited
Loading

FIRAuthUIDelegateProtocol should just be a typealias for FIRAuthUIDelegate on the iOS side. You are right however that it can be null, so you should probably use your alternative suggestion.

Copy link
Author

kiiskristo commented Jun 12, 2024
edited
Loading

@BasBuijsen - thank you, actually ended up doing similar way as you described for now.
@Daeda88 - updated PR to alternative way, looks cleaner and reflects native IOS SDK with optional delegate.

@kiiskristo kiiskristo changed the title (削除) PhoneAuthProvider for ios (削除ここまで) (追記) PhoneAuthProvider for ios, js, android (追記ここまで) Jun 12, 2024
@kiiskristo kiiskristo changed the title (削除) PhoneAuthProvider for ios, js, android (削除ここまで) (追記) PhoneAuthProvider Fix for ios, js, android (追記ここまで) Jun 12, 2024
@kiiskristo kiiskristo changed the title (削除) PhoneAuthProvider Fix for ios, js, android (削除ここまで) (追記) PhoneAuthProvider Fix for io (追記ここまで) Jun 13, 2024
@kiiskristo kiiskristo changed the title (削除) PhoneAuthProvider Fix for io (削除ここまで) (追記) PhoneAuthProvider improvement for ios (追記ここまで) Jun 13, 2024
@nbransby nbransby merged commit ba3d156 into GitLiveApp:master Jun 15, 2024
Copy link

Can Some one guide me on how to use this Phone Authentication i am able to send the otp but how to do verification

rsuman132 reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer

@Daeda88 Daeda88 Daeda88 approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /