Skip to content

Commit 5797feb

Browse files
author
Guilherme Souza
committed
remove custom configuration from oauth example
1 parent d8d7b22 commit 5797feb

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

Examples/Examples/Auth/SignInWithOAuth.swift

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ struct SignInWithOAuth: View {
4646
}
4747

4848
final class SignInWithOAuthViewController: UIViewController, UIPickerViewDataSource,
49-
UIPickerViewDelegate, ASWebAuthenticationPresentationContextProviding
49+
UIPickerViewDelegate
5050
{
5151
let providers = Provider.allCases
5252
var provider = Provider.allCases[0]
@@ -88,10 +88,7 @@ final class SignInWithOAuthViewController: UIViewController, UIPickerViewDataSou
8888
do {
8989
try await supabase.auth.signInWithOAuth(
9090
provider: provider,
91-
redirectTo: Constants.redirectToURL,
92-
configure: { session in
93-
session.presentationContextProvider = self
94-
}
91+
redirectTo: Constants.redirectToURL
9592
)
9693
} catch {
9794
debug("Failed to sign-in with OAuth flow: \(error)")
@@ -114,10 +111,6 @@ final class SignInWithOAuthViewController: UIViewController, UIPickerViewDataSou
114111
func pickerView(_: UIPickerView, didSelectRow row: Int, inComponent _: Int) {
115112
provider = providers[row]
116113
}
117-
118-
func presentationAnchor(for _: ASWebAuthenticationSession) -> ASPresentationAnchor {
119-
view.window ?? UIWindow()
120-
}
121114
}
122115

123116
#Preview("SwiftUI") {

0 commit comments

Comments
 (0)