I have logged in as user and tried to delete the same account. But getting the below error instead of redirecting to login page the error pop up. This issue happens in symfony 3. I have used serialized and deserialized method in the user entiry
Error:
You cannot refresh a user from the EntityUserProvider that does not contain an identifier. The user object has to be serialized with its own identifier mapped by Doctrine.
Please suggest
Related
I'm building a Django where the admin will create a user and then one mail will be sent to the user. In the mail, I'm also sending one token with the URL on clicking which the user will get verified by checking the correctness of the token.
But the problem is I'm storing the token in Django session and when I open the link on the same browser it works but on a different machine user is not getting verified as session data becomes unavailable.
Someone suggest me the best way to store the token.
I didn't want to use the database as it doesn't make sense.
Im using Angular as frontend and Django as backend. When fetching the logged in user, there is a small lag or "flickering" in the username displayed in the top menu due to the Angular having to ask the backend for the user data, after receiving the token and wait for the promise to return the user data.
To authenticate and log in i use django rest framework:
url(r'^token-auth/', obtain_auth_token)
This returns a Token - all works well and Im logged in. But this call doesnt return any user data, so to solve this I created a separate api view that returns the user. A service in Angular is triggered to fetch the user data directly after receiving the token.
But to do that Angular has to call the user view separately and that in turn can lead to "lag" in the way that the users data wont load instantly in the menu upon login (because Angular has to fetch the users data again, after receiving the users token on the first call).
This got me thinking, what is the best way to get the logged in user data after receiving the Token and "beeing logged in"? Is there a better way to do this?
Or if this is the correct way to do it maybe I should just handle the loading of data in the menu in a different way?
I have a logged in user, and I logout with:
cognitoUser.signOut();
Then I try to login as a different user.
An error is received that says "logins don't match".
How do I logout a user properly so this error doesn't happen upon the first new login attempt?
Your CognitoAWSCredentials should have a method called clear(). You need to call this before you try to login with a different user. Seems that something gets cached.
If for people like me who have tried the clear() on the credentialsprovider and calling the signOut() on the user, and still getting the error as logins don't match, it should be the reason because the CognitoSyncManager is retaining the identity and other credentials of the previous logged in user. To overcome this, the call to wipeData() on the cognitosyncmanager client has to be made when the logout is initiated, this will make sure that all the retained data are removed.
I have a 1.10.1.1 Magento Enterprise version running and tried out the webservice. If I correctly login I get a session id which I can use to make further calls to the web service.
If I leave either the user or password field empty or both empty and want to login I also get a session id. But if I then want to call another method with this session id I get the message I have to relogin.
If I use wrong credentials (both user and password are filled with something) I get a message "Access denied".
So why do I get a session id I can't use if i leave one field (user/password) empty and why don't I get a message "Acces denied" then? Is this an error?
According to the documentation I must remove an apprequest when a user has accepted it. There is however a problem with this.
When I accept an apprequest, I will be redirected to my app. But in the url parameters only the apprequestid(s) are included. The userId of the current user is unavailable.
My app doesn't require authentication so I can't access the current users data.
How do I remove the apprequest for this user when I don't have acces to the userdata or accesstoken as described here:
The old method of the apprequest allowed me to extract the userid from the requestid. This is not possible anymore.
you have to have authentication to "tamper" with user data - that includes app invitations.
However with an App Access Token you might be able to delete the post without authenticating your user (you'll still have to aquire their UID - possibly from the signed_request . You can read at this link about app login and how to retrieve the correct access token.