When implementing a standalone application, is the...
# compose-wear
b
When implementing a standalone application, is there any way to authenticate the user while using Compose?
j
Authentication and Compose are really two separate concerns. You can use the standard suite of Wear Authentication techniques. https://developer.android.com/training/wearables/overlays/auth-wear#:~:text=The%20third%2Dparty%20Wear%20OS,OS%20app%2C%20and%20logs%20in.
👍 1
b
Okay, I might have misunderstood 😀 Or I was not clear enough, text-input (such as name/password or unique ids) can't be done with Compose? (The input to the wear authentication techniques. I guess I can combine the compose UI with some other activity to achieve this)
j
if you want text input then on a Wearable I would suggest you use wear-input library RemoteInputIntent, basically you want to use GBoard - we have no plans to support TextFields in Wear Compose as we think its a user experience anti-pattern and the wear-input library is the least worst way to do text input
👍 1
b
Okay thank you. Yeah, I will take that into consideration. The application I am working at must work as a standalone app, maybe we have to face the need of a phone x)
j
Standalone apps are encouraged, hopefully the link I sent earlier helps you navigate the Auth options. If text user/password entry is your best option then the GBoard is great for what it is.
y
What is the actual authentication mechanism? I've tackled this a few times now for different APIs. In all but one case I was able to use the RemoteAuthClient that John linked to.
Or is this something different like Basic authentication and you really need a plaintext password?