accountkit | Facebook account kit integration with PHP
kandi X-RAY | accountkit Summary
kandi X-RAY | accountkit Summary
Facebook account kit integration with PHP
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of accountkit
accountkit Key Features
accountkit Examples and Code Snippets
Community Discussions
Trending Discussions on accountkit
QUESTION
I am using angular6, in my project I am using Facebook Account Toolkit for mobile verification purpose.
I need to initialise Account toolkit in index.html file using following code.
...ANSWER
Answered 2019-Sep-06 at 14:37You should create copy of index.html and name it index.someenv.html
.
Then in your angular.json in environment configuration setup file replacement:
QUESTION
After updating to the latest Xcode to support ios12 I can't build my project It seems that none of the pods are being compiled. I'm getting an error for unknown import such as "file not found" (ex 'SDWebImage/UIImageView+WebCache.h' file not found)
(if I comment everything related to this, it's just showing an error for the next package that does not exist)
for plugins installed from pod.
if I add the pod scheme and compile it, and then compile my project all the imports are working fine but then I get this compiler error for every package:
Showing Recent Messages
...ANSWER
Answered 2018-Dec-14 at 06:19This is the problem of your previous cache store in the derived data folder.
Go to the DerivedData folder. Close XCode. Delete your apps from DerivedData folder. Reopen XCode, clean project and run again.
XCode preference > Locations > Derived Data (click right side icon in the directory path, it will open DerivedData folder)
Select your pod from the left project navigator. > Select Target. > Select "Build Settings". > Build Active Architecture Only to No
QUESTION
I just saw that facebook account kit is being deprecated. There isn't much information about what's the reason behind its depreciation or what could be the next steps/alternatives.
- Does anyone know why they deprecated it? Any technical insights/learnings?
- What are the alternatives now? or are they planing any successor of it?
ANSWER
Answered 2019-Sep-18 at 19:02Yes, As per official statement : from September 9, 2019: Account Kit will stop integrating with new apps. Existing integrations will continue to function normally.
Does anyone know why they deprecated it? Any technical insights/learnings?
"The product has yielded high maintenance costs, but relatively low adoption". Read full details here.
What are the alternatives now? or are they planing any successor of it?
They not announce any successor for it as far as i know, but there are many other alternatives available as open source which obviously have certain limitations. What I am using currently will mention here.
- True Caller SDK : It require true caller app to be installed in user device.
- Firebase Phone Authentication
- Third Party SMS API : Obviously, it would be a paid api, Many service providers are available in market. I am not promoting any one here but one is suggested by google itself here called twilio. Just a extra point : In this 3rd case, for understanding the flow "SMS Retriever API" may worth reading for some one.
QUESTION
I'm using AccountKit (latest version) by Facebook for user login with sms. Whenever I click on login, there's a huge memory leak shown by LeakCanary
. I know that its a library problem but is there a workaround?
Heap Analysis shows 11 retaining objects. After dumping, the app size grows by 200 MB. Here are the logs:
...ANSWER
Answered 2020-Feb-08 at 08:15It was happening only in debug build. After publishing the app the memory leak problem got solved. Still unclear why it would occur in debug build.
QUESTION
It's good to have a Updated Android Studio 3.0. But I am facing a problem with Android Studio 3.0, I just created a new project in Android Studio 3.0. Then I got some error
I solved these by changing dependencies
to latest version and issues solved.
But, when I added a dependency
of facebook account-kit sdk com.facebook.android:account-kit-sdk:4.+
I am getting following errors-:
Error:Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.facebook.android:account-kit-sdk:4.+. Open File
Show Details
build.gradle(app)
...ANSWER
Answered 2018-Mar-11 at 00:41QUESTION
I'm using the following link to integrate facebook account kit (version 5.0.0)
to my android
app. I'm using both the sms and whatsapp logins but the received codes are not being autofilled in both the cases:
https://developers.facebook.com/docs/accountkit/android/
What could be the possible cause of this? Thanks.
...ANSWER
Answered 2019-May-27 at 13:14The autofill feature has been removed in their latest sdk. Reference:
https://developers.facebook.com/support/bugs/704794763310779/ https://developers.facebook.com/support/bugs/615262038994308/
QUESTION
I have one requirement, the campaign page will embed the signup page of landing. like this
...ANSWER
Answered 2019-Feb-22 at 02:05Add the header in your web server response:
QUESTION
I need clarification on the doubts I have about PHP
sessions.
I'm creating an Android app
, in some activities I need to make queries to extract user data.
At the moment to do so, I send the user id
to the PHP
file via the hidden EditText
from the Android app
.
In the Android app
the user id
is not saved in shared preferences
, but I get it through a request to Facebook Account Kit (for authentication use Facebook Account kit).
So when I need the user id
, I request it from Facebook Account Kit, I get it and through a hidden field I send it to the PHP
file, which I will use later in the WHERE
clause of the Query
.
Now, however, for security reasons, I would prefer to use the sessions to save the user id
and then keep the user id
in the session
.
A friend of mine told me that if a hacker gets the id
of the session
, in which the user id
is saved, it can happen that it has expired and that he can't get anything.
The problem is that I don't understand how to save the session ID
and the user
ID and how to manage them at the database
table architecture level.
I have to save the session ID
in the database
, I create a table called "Sessions
" with 3 fields:
- Session_ID,
- ID_User,
- Data_access.
To insert the user ID
on the database
I should always pass it from the app to the PHP
file, and so if a hacker could discover the user id
, I think he could very well get information about sessions
with a WHERE
clause ID_user = ID_user
.
Quite right?
If I'm right, then what's safer than what I do?
Then if the ID
of the Session
changes with each access, to change it in the Sessions
table in the MySql
database I should switch from the Android app
to PHP
again the user id
and through a query Update I should change the session id
and date of access with ID_User = ID_User
in the WHERE
clause.
Exact?
If anyone has any advice for me or a criticism of how I handled the situation and has a better solution than mine, I listen to it willingly.
If I didn't understand anything about how the sessions work, then excuse me in advance for the time I stole from you.
Thanks anyway.
...ANSWER
Answered 2019-Apr-21 at 11:34PHP sessions are based on Cookies. When a user opens a webpage, PHP set a cookie in response. Browser automatically ensures that in subsequent request, that cookie is also sent in requests, hence $_SESSION variables works. In my opinion, they don't provide much of the security. Instead of User Id, now a malicious user has to get his hands on the Cookies. Always use HTTPS for securing the Requests.
With Android app, you'll be making a custom request, so you'll have to explicitely set the cookie, once received from the very first call (You'll have to persist it on the client-side; Not a good approach).
The usual way of working of session is as following -
- When $_SESSION is used to set a value for the very first time, PHP sets a Session cookie, which essentially is a random String.
- Behind the scene (in Backend), PHP is maintaining an Object (key-value pair) against this string value. (
SessionKey1 = { key: value, key2: value2 }
; this could be on Disk File system or on a Cache layer (e.g Redis), depending on your server configuration) - When you set/updated/delete a key in session,
SessionKey1
is modified.
Now you can create a similar behaviour for yourself. When userId is found on Android App side, send it to backend, create a row in session table (Session Id as a Random String and UserId as UserId). With each request send this SessionId alongwith the request (in the body or headers), on the backend check if sessionId received exit in Sessions table. If yes, get user Id and process.
Here is an alternative approach (probably a-bit more secure)
When Access Token is found after Account Kit verification
- send it backend
- validate the Token from Facebook APIs (Link)
- Validation API also return user info, map it to your User's Data (from your DB Structure).
(This will ensure that Token is always Valid, user won't be able to put a random token in order to attack as that will fail the verification from Facebook APIs).
Generate a UUID, create a row with
- UUID as sessionId,
- Your userId
- Access Data
- Created At (when row is created)
- Expiry (Current Time + X days)
send this UUID in response.
Now on Android side, save this UUID somewhere. Create a request Intercepter, for all the request set this UUID in a custom header (e.g X--Auth
). On backend side for each request, access this Header, check if it's expired, get the User Id from your session table, and proceed.
I think he could very well get information about sessions with a WHERE clause ID_user = ID_user.
Quite right?
You are absolutely right. But, securing the DB layer should be a separate task from the Application development. How do you think a Hacker would be able to execute queries in the first place? If one finds a way to run raw queries on DB, he can do a lot more damage than just extracting the data.
If I'm right, then what's safer than what I do?
There is not right answer, you just have to do your best to secure the application. Ensure that your application is following best security practices. For example - Use HTTPS, preventing SQL Injection.s (Search for OWASP Vulnerabilities
)
QUESTION
I want to enable an Alert Dialog after user successfully first time login to my app. The Alert Dialog should display at the main page of my app but it display just before proceed to main page. How to display it at the main page of my app ? Below is the code of my app:
...ANSWER
Answered 2019-Mar-11 at 11:22Perhaps display the AlertDialog in onCreate() of your main page. Create a SharedPreference value that tracks whether the AlertDialog has been shown previously, and only display it if it hasn't.
QUESTION
I am having a problem with my code.
I have an activity with an EditText
, when the activity opens for the first time I would like to pass the value of the EditText
to my server and receive an answer.
The problem is if I call the method in onCreate ()
it does not work.
If instead I call the method from the
click ()
event of the button
it works.
Is there a way to call the method from the onCreate ()
and display the contents of the EditText
?
This is my code :
...ANSWER
Answered 2019-Mar-08 at 12:48What you need to do is just use CountDownTimer
to let system load and be ready to let your code be execute right way.
Hope this helped you.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install accountkit
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page