I have two android app with the SalesForce SDK integrated, but the case is if I installed one app in mobile and I launched another then it's SalesForce login page is not getting appeared.
Please give me solution or tell me the reason why it is happening if anyone know.
Thanks in advance.
Add "account_type" tag in your strings.xml
It will avoid conflict of two sales force sdk in single device.
You should check if the session ID is active for Salesforce.
SalesForce OAuth2 Ongoing Authorization flow documentation says
The customer opens a mobile app.
If the session ID is active, the app starts immediately. If the session ID is stale, the app uses the refresh token from its initial authorization to get an updated session ID.
The app starts.
Please read the Salesforce OAuth2 Authentication Flow for details.
Related
i'm new to android studio, and i dont know much about it. My question here is do android provide any authentication method like aspx / php (laravel) that check if a user stay logged in and etc.
From what i learnt so far, i have to sign in to my app by receiving json/xml data from my web service, so my app just display the next screen after the id/password is correct? Is there any more security issue that i need to worried about? Aspx authentication do authenticate on every page even after your first login. But after some research i dont see android studio have this kind of authentication. Am i missing something?
You can use Firebase Authentication for sign-in methods and user management.
You can add Firebase to Android Studio in Tools > Firebase.
No there is no default function in android that does what you want, you have to add a new sdk to handle this issue. You Can Use Firebase as Aviad Nemet said. Or you save in the shared preferences that you user is authenticated after login success. Saving in the Shared Preferences is safe.
First of all, sorry for my poor english as it is not my native language.
So my coworkers set up a Salesforce authentication via openld on a Java Android app. The auth demand gets us back a valid access_token, which allows us to obtain informations on the Salesforce API.
The problem is that when the user disconnects from the application, the connexion is still active and doesn't ask again for user's password, which is an obvious security issue. Do you know how we could force a new authentication each time the user disconnects ?
We already tried token revocation but it also revokes every rights from the user, which doesn't satisfy us. We just need the app to ask for a login after a disconnection.
Thanks in advance !
Salesforce SDK saves the login details in preferences, thus it doesn't ask for authentication the next time user visits the app. You can logout of Saleforce to clear the saved data using this:
SalesforceSDKManager.getInstance().logout(this);
Can I use Azure AD Login parallel to database login to my web application using JAAS? I have created a web app in azure portal and have tried the login using the code present here: https://github.com/AzureAD/azure-activedirectory-library-for-java/blob/dev/src/samples/public-client-app-sample/src/main/java/PublicClient.java
But I'm facing issues like
The request body must contain the following parameter: 'client_secret
or client_assertion'.\r\nTrace ID:
fd0sxdac-72a3-4ac2-9aca-02aa64bb8ef5\r\nCorrelation ID:
96xsdb2c-864e-4325-b8cb-98fb6d6ab541\r\nTimestamp: 2017-02-10
13:30:02Z","error":"invalid_client"} at
com.microsoft.aad.adal4j.AdalTokenRequest.executeOAuthRequestAndProcessResponse(AdalTokenRequest.java:108)
I changed my app to native app and tried login again, but this time I ended up getting this error:
com.microsoft.aad.adal4j.AuthenticationException:
{"error_description":"AADSTS65001: The user or administrator has not
consented to use the application with ID
'7xxxyyy9-bcf6-4uu1-bzzz6-d279189ea7bf'. Send an interactive
authorization request for this user and resource.\r\nTrace ID:
cbd15f8a-983b-469f-9e20-bf0c8eee4e0c\r\nCorrelation ID:
213bb116-3617-4b89-8170-a123e072bfb5\r\nTimestamp: 2017-02-10
15:32:12Z","error":"invalid_grant"} at
com.microsoft.aad.adal4j.AdalTokenRequest.executeOAuthRequestAndProcessResponse(AdalTokenRequest.java:108)
I've added the required permissions to the app using Microsoft Graph (sign in and read user profile), but still doesn't work. I'd really appreciate if one of you could point me in the right direction.
Figured out the answer actually, I just had to grant the relevant permissions on the application and it started to work.
I am attempting to integrate onboarding screens into my Android application that allows users to register through Email/Password, or through Logging in with Facebook.
Is there any way of programmatically knowing when the user logs in through Facebook whether it is the first time of doing so?
I only want the Onboarding Activity to launch the first time the user logs in through Facebook (after accepting the permissions request), not every time they log in.
Any help with this issue would be hugely appreciated.
use facebook API's to authenticate the users.Login to the facebook developer console to register your application and get the key hashes that will uniquely define your application.
Use facebook Api by this link https://developers.facebook.com/ register your app.
and follow the instruction as mentioned.Then you can integrate facebook logging in your App
I'm trying to use the spring social facebook plugin. To do so, I'm using the quickstart-v3 sample they provide. It works fine, except one point : with my facebook account, I can browse all my friendlists. I added the permission read_friendlists in the application management and the application requests the good rights when used for the first time. However, when I log in to another facebook account (as application admin as me), I get nothing. Do you guys know what the problem could be ?
I found the problem : I didn't used my app permissions but the graph api permissions. That's why it only worked with me.
You need to request read_friendlists permission for every account you're connecting to your app.