isAuthenticated for Modal

Here is a screenshot of a Bootstrap Modal. I am perhaps trying to achieve something that isn’t as straightforward, but I am hoping to find the answer to whether I should use this or not.

This looks like something that you can generate to show it, not sure what you mean by returning it, maybe you only want to display it

Yes I want to show it after the MetaMask signingmessage. I just haven’t been able to achieve this. This is the bootstrap modal in my index.html file.

<!-- Modal -->
              <div class="modal" tabindex="-1" role="dialog">
                <div class="modal-dialog" role="document">
                  <div class="modal-content">
                    <div class="modal-header">
                      <h5 class="modal-title">Modal title</h5>
                      <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                      </button>
                    </div>
                    <div class="modal-body">
                      <p>Modal body text goes here.</p>
                    </div>
                    <div class="modal-footer">
                      <button type="button" class="btn btn-primary">Save changes</button>
                      <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                    </div>
                  </div>
                </div>
              </div>

what does that if do with 2 parameters?

I can’t do anything with !isAuthenticated I tried a few things, but it doesn’t do anything.

isn’t this part equivalent with isAuthenticated? if user is defined, then it is authenticated?

I am not sure. Because yes, you are right that it is already authenticated but after that user = await Moralis.authenticate({signingMessage: and I click the sign message in MetaMask, that is when I need it to show the modal. Someone on discord advised me to use isAuthenticated. It is why I am trying to use it like this.

isAuthenticated may be related to react, current code seems to be vanilla js

Is there a way to do it in vanilla js?

I think that it is enough to try to get current user