Use Keycloak with react native - react-native

I'm developing an app for ios and android in react native and need to use keycloak for authorization, but struggling to find a good way.
I've tried react-native-app-auth and it works good to sign in but not to sign out.
Not so strange because react-native-app-auth states that: "Keycloak does not specify a revocation endpoint so revoke functionality doesn't work."
I've had a look at a few other npm packages such as react-native-login-keycloak but they seem to lack maintenance and opens a lot of browser tabs.
Any ideas of how to solve this or maybe do a work-around for react-native-app-auth?
Thank you for your help!

Check the openid-connect configuration endpoint.
You can find it in your keycloak server
https://{your-keycloak-server}/auth/realms/{your_realm}/.well-known/openid-configuration
you will find the endpoints for:
authorization_endpoint
token_endpoint
end_session_endpoint
Add those to your react-native-app-auth configuration.

Related

How do I secure my electron app with firebase auth?

I want to secure my electron app with firebase auth. The idea is that the user has to click on a button in the renderer process to "Sign up/ Login" and then a new browser window opens in his default browser (not in electron), the user signs up or in and returns back to electron app which automatically signs the user in.
I'm using the following:
Electron: 13.6.9
Angular: 12.1.2
I tried the Electron Firebase repo but to be completely honest I was totally overwhelmed. It's well documented on how to setup but not on how to implement it to an existing app.
I also found this but this seems to be highly insecure to have an auth token exposed: https://pesto.app/blog/how-to-authenticate-with-google-in-electron
Could you guys help me to figure this out in a conceptual way (if you have code examples even better)?
Thanks in advance!

React Native integration with identity server

I have a react native app which is created using react-native-cli.
In official react native documentation it recommends to use react-native-app-auth which has too many issues reported.
However since it’s used by many i have started my implementation but came across many issues related Android.
Is there a recommended library that is maintained or tutorial that provides the guide to implement authentication using authorization code flow with PKCE?
Thanks in advance
AppAuth are the official libraries, though they are easier to integrate into a Kotlin based app, since the tech gets quite native in places:
Opening a Chrome Custom Tab
Registering redirect schemes
An Authorization Code Flow redirect
An Authorization Code Grant POST
A Refresh Token Grant POST
Secure storage of tokens on the device
Good login usability
Handling error and expiry conditions
AppAuth is primarily a pattern though, from RFC8252, so you could implement the above in Javascript code.
Start by implementing the above 3 OAuth messages and ensure that you understand payloads. Post back if you get stuck on areas such as PKCE and I can point you to some relevant JS code.
TRICKY AREAS
My Android Blog Posts may help you to clarify your requirements and explains some common problems and resolutions. There is a detailed code sample you can run locally also.
MOBILE TECH
I had a React Native sample in the past, but found the tech too painful in some areas:
Missing error details in responses from React-Native-App-Auth
Red screens when tracing HTTPS requests.
Therefore I switched everything to Kotlin where there are fewer tech layers to deal with.

UBER EATS API EXPO AUTHENTICATION USING EXPO

I'm new to expo and i've been trying to integrate the uber authentication to my app and i've tried the authentication example shown in the authentication page of expo documentation for uber.
Uber Example Authentication in expo documentation
https://docs.expo.io/guides/authentication/#uber
And when I Login in browser I get an invalid_request.
I tried debugging the object and says my scopes are invalid, and i checked the documentation and the scopes are correct so idk how to solve this problem.
The debug result here
Any Help would be appreciated!
I've found the problem, I didn't need to identify the scopes because he would receive the authorization url with the scopes inside.

Trying to setup Auth0 with my Cordova Vue js project

So I created the entire website using auth0. But then when I compiled the web app using Cordova, auth0 is giving me errors relating to callback URLs. Auth0 provides a Quickstart guide to config with Cordova, but it relies on Cordova plugins which I cannot seem to access.
It seems like a small error, just the callback URL is wrong. But no matter what I do I cannot seem to make it work.
Any help is very much appreciated.
Thank you!

How can I add authentication module for my Sonos App

My company has a Sonos App on live. They want me to add authentication to the app. I red all the documentation but really its very hard for me, I cant add an authentication / Login module to this App. Maybe someone can help me for do that. Best regards:)
The authentication documentation is the best place to start. If you have specific questions about that documentation, you can post them here on SO.