[SOLVED] Moralis Authentification

Hello everyone,

i followed several threads about the authentification process with Moralis, but i can’t find where i made a mistake with the following code:

here is my code in react to get the user address:

and the result in the console:

Screenshot from 2022-09-14 17-19-22

account and user.attribute.ethAddress return the user address, but userAddress and userAccount are not updated with the useState hook.

EDIT: here is the solution.