Comments (3)
You can just publish the library to maven local and then use it as a normal library. In order to do that,
- Comment out this line:
Line 44 in 74cb875
- Change the version to something different like
2.1.0-local-1
(change this as you want):
Line 13 in 74cb875
- Run
gradlew publishToMavenLocal
, wait for it to finish - Use the locally published library exactly like you'd add the "real" library, just with your defined version. Also make sure to add the
mavenLocal()
repository for your dependencies (within your app)
If you just have a small change which doesn't require a full app to test, you can create a "test" module within the cloned supabase-kt project and just make a small jvm module or something like that and run it. You can add the modules (e.g. realtime) via implementation(project(":realtime-kt"))
.
Remember to reverse such changes when making a PR, the "test" module is in the gitignore file and always added in the settings.gradle.kts file, so you can always have that there.
from supabase-kt.
thanks @jan-tennert , I was able to run it locally and have found out where the issue is happening, still not sure if it is something on my end but here is what I found
and Should I create a new issue with these details?
I have added the code and the logs output below
I put some logs in the method "rememberSignInWithApple" and here are my obervations
1.The method runs as soon as the app opens, without user doing anything, although the code inside launched effect doesnt runs and directly the last log is printed
- Then when I click on the sign in button all the statments that are marked "executed" run in an instant without me doing anything
3.Nothing is executed after I click on "signIn"(after putting password in the box) in the apple native signin ui
4."nonce" and the "user" properties are showing null
5.All properties inside the config.loginConfig["apple"] object are null, even though object is not null
6.IMPORTANT -looks like authorizationController() method is never executed, I had put some logs in that method too but nothing was printed and also the print statement "I am here 10" was not printed
@Composable
actual fun ComposeAuth.rememberSignInWithApple(
onResult: (NativeSignInResult) -> Unit,
fallback: suspend () -> Unit
): NativeSignInState {
val state = remember { NativeSignInState() }
val scope = rememberCoroutineScope()
LaunchedEffect(key1 = state.started) {
println("I am inside launched effect")//executed
if (state.started) {
println("I am inside first if block , which means state is set to started")//executed
println("${config.loginConfig["apple"]}")
if (config.loginConfig["apple"] == null) {
println("I am inside 2nd if block , which shouldn't happen")// NOT EXECUTED
fallback.invoke()
state.reset()
return@LaunchedEffect
}
val appleIDProvider = ASAuthorizationAppleIDProvider()
val request = appleIDProvider.createRequest().apply {
requestedScopes = listOf(ASAuthorizationScopeFullName, ASAuthorizationScopeEmail)
nonce = (config.loginConfig["apple"] as? AppleLoginConfig)?.nonce
println("loginConfig - ${config.loginConfig["apple"]} server client id - ${config.loginConfig["apple"]?.serverClientId}")//executed
println("requested scopes - $requestedScopes , nounce - $nonce ")//executed
}
println("request - $request - user - ${request.user}")//executed
val controller = ASAuthorizationController(listOf(request)).apply {
println("i m inside controller ${this.delegate}")//executed
delegate = authorizationController(scope) {
println(" I m here 10")// **** NOT EXECUTED ****
onResult.invoke(it)
state.reset()
}
println("I am here in the controller") // EXECUTED
presentationContextProvider = presentationAnchor()
}
println("controller - $controller - delegate ${controller.delegate}") // EXECUTED
println(" i am on my way further 3") // EXECUTED
controller.performRequests()
println("I am after the perfrom Reuest function")
}
}
println("I am outside launched effect and state is $state.") //Executed first
return state
}
##output
I am outside launched effect and state is io.github.jan.supabase.compose.auth.composable.NativeSignInState@8a32be0. I am inside launched effect starting apple auth I am outside launched effect and state is io.github.jan.supabase.compose.auth.composable.NativeSignInState@8a32be0. I am inside launched effect I am inside first if block , which means state is set to started AppleLoginConfig(serverClientId=, nonce=null, extraData=null) loginConfig - AppleLoginConfig(serverClientId=, nonce=null, extraData=null) server client id - requested scopes - [full_name, email] , nounce - null request - <ASAuthorizationAppleIDRequest: 0x60000213c820> - user - null i m inside controller null I am here in the controller controller - <ASAuthorizationController: 0x60000390a2f0> - delegate <ComposeApp_kobjc5: 0x600000260740> i am on my way further 3 I am after the perfrom Reuest function
from supabase-kt.
Yes, I created a new issue for you: #447
from supabase-kt.
Related Issues (20)
- [Feature request]: Support Realtime throttling
- [Bug]: Limit and nested joins HOT 2
- [Bug]: Concurrent connect() to Realtime can lead to instabilities HOT 1
- [Question]: Google ID:GetCredentialResponse error returned from framework HOT 5
- [Bug]: Problem with loading data in the background. HOT 6
- [Bug]: Im getting an error when I try to install Storage in hilt. HOT 14
- [Bug]: Using multiple order modifiers doesn't work properly HOT 2
- Unable to send or receive data after resubscribing to channel HOT 8
- [Feature request]: Add `signInAnonymously` method
- [Bug]: A println statement in OutlinedEmailField (ComposeAuthUI) HOT 1
- support linkIdentity HOT 1
- [Bug]: Realtime socket never reconnects due to deadlock HOT 2
- Compose Auth Google signin crashes in android 14 HOT 2
- [Question]: Should missing Json properties be ignored by default? HOT 1
- [Question]: Error when accessing storage bucket from kotlin sdk HOT 7
- [Question]: Comparing timestamptz in jsonb structure. HOT 3
- [Bug]: Uncaught IndexOutOfBoundsException during createSupabaseClient() HOT 3
- [Feature request]: Allow customization of the CustomTabIntent on Android when using OAuth
- [Bug]: Can't find "org.jetbrains.compose.annotation-internal:annotation" HOT 11
- [Bug]: ComposeAuth Google Login Issue HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supabase-kt.