Register User Id and Display name in MFP Push notification - mobile

How to register the device with user id and display name.. In MFP console, its not showing the same..
Is there anyway to add these 2 in "MFPPush.registerDevice" Function ?

You can see userId in MFP Console whenever user is logged in with UserLogin Security Check in the application.
Refer User Authentication tutorial to know more about UserLogin Security Check in MFP 8.0 : link
In order to set device display name, You need to use setDeviceDisplayName in your client Application.
The following are the links to API Documentation for setDeviceDisplayName API.
Cordova : link
Android : link
iOS : link
You cannot add these parameters using MFPPush.registerDevice(). registerDevice() API takes the authentication context (from the security check) and adds the userID and displayName automatically.

Related

How to customize Verify your identity (entering verification code) screen in Salesforce?

I have created Connected App in Salesfoce and have customized the login screen (changing logo, button css etc., using Visualforce). When user logs in for the first time or logs in from different browser or device, it prompts for 'Verify your identity' (to enter verification code).
I know we can customize the option of sending the verification code to mobile or email. But, I would like to customize the 'Verify your Identity' screen like changing the logo, button css etc. I didn't find it under Visualforce Pages.
Where is this located and how can the styles be customized?
This will be possible in Winter '20. From Release Notes:
When external users register a verification method, either a phone
number or email address, Salesforce displays a Verify page for users
to enter their verification code. You can replace the default Verify
page with your own, for example, to reflect your brand or meet your
corporate guidelines

Cannot get username in client MVC app

I have 2 projects, one is the identity server 4 and one is the client AspNetCore MVC.
On client app, how I can get the current user name or current user email ?
More specific, I would like to put it on _Layout.cshtml .
Thank you,
Mihai
You can make a rest call to the server and have it return the authorized user.
Make sure you have the correct claims.
Get current user name in IdentityServer4 & ASP.net Core
For the official docs to getting user info check here:
http://docs.identityserver.io/en/release/endpoints/userinfo.html
If your MVP app requests the scopes email and profile then these 2 properties should be available in the user claims (available through this.User.Claims in the MVC controller).

JHipster angularjs application - Want to perform the login operation with mobile number instead of username

I am new to jhipster, so I just created a jhipster application with angularjs and spring. I want to perform the login operation with mobile number instead of username. I have already created a mobile number field during registering new account but on login screen I am not able to find the query where I can change username with mobilenumber.
Basic monolithic app setup is made with yo jhipster.
Thanks in advance
You have to look at the implementation of UserDetailsService and replace how the user is being loaded. For example, change the below line to load user by mobile number.
Optional<User> userFromDatabase = userRepository.findOneWithAuthoritiesByLogin(lowercaseLogin);
You could also save the mobile number in existing login field. Then you do not need to change anything.

How to get post id when we share our content using share dialog?

I am phone-gap developer. I make a application for getting like and comment via post image caption on Facebook. So we are using a plugin of iOS and android for the same but i am not getting any post-id in return after sharing the image through default share dialog in both.
Plugin Link : https://github.com/jeduan/cordova-plugin-facebook4
Use Case in android :-
1- We are getting post-id when Facebook application is not installed in device.
2- But we are unable to get the post-id when Facebook application is installed in the device.
Use Case in iPhone :-
1- We don't get any response after sharing images in iPhone device.
2- But getting response (post-id) when share through simulator.
Please help me with proper solution. It would be great if you join us in team-viewer to solve our problem.
Thanks in advance.
The only way to get the post id is to authorize users with the publish_actions permission - you would also need the user_posts permission to get access to the new post in order to get the likes/comments. According to your comments, you want to pay users for those - which is not allowed and Facebook will never approve the required permission in the neccessary login review process.
In other words: It is not allowed and not possible.

Login With Facebook After Registration - Meteor

I am currently working on my first AngularJs + Meteor app. In this app, user can either register using $meteor.createUser or can use Facebook to login i.e. $meteor.loginWithFacebook. After logging in, on one page I am displaying user's friends from Facebook who have used this app. If user has logged in using Facebook then that page is working properly. But if user has registered using normal Meteor login [$meteor.createUser], then on that page I have to display Login with Facebook button. When user logs in with Facebook on this page, it is creating new document in users collection. But I am using Meteor.userId() as primary key in all tables. So I have following options:
Option 1:
delete current document of user [_id no 1]
log in with Facebook
change _id of a document created while logging
with facebook to _id no 1
Option 2:
Assign "_id no 1" to user while he registers using Facebook
But I have not found any way to do so. How to do it? I am not able to change _id of document present in users collection. Please help. Thank you in advance.
I think you have to merge those accounts. This package will be helpful:
https://atmospherejs.com/mikael/accounts-merge

Resources