title: Post Method value is undefined
body: <p>The return of email2 is undefined. The method userRepository.getAllConfirmedEmails(...) delivers the right value, but in the post methode the return is undefinded.</p>
  <pre><code>  app.post('/login', async (req, res) =&gt; {
          const { email } = req.body;
      
          // get safetyAttribues
          const safetyAttributes = await safetyAttributesClass.getSafetyAttributes(email);
      
          // if both are true, try to send login challenge
          if (safetyAttributes.isAccepted &amp;&amp; safetyAttributes.isConfirmed) {
              if (safetyAttributes.isAdmin) {
                  const email2;
                   const token = await safetyAttributesClass.generateAdminToken(email).then(async (token)  =&gt; {
                       email2 = await userRepository.getAllConfirmedEmails(email, token).then(async (email2) =&gt; {
                          console.log(&quot;HIER STEHT DIE ZWEITE EMAIL--&gt;&quot; , email2);
                       })
                       
                  });
                  
                  
      
              }
              const user = userRepository.findByEmail(email);
              console.log('HIER ISTHEH &lt;USJR', user);
              if (!user) {
                  return res.sendStatus(400);
              }
      
              const assertionChallenge = generateLoginChallenge(user.key);
              userRepository.updateUserChallenge(user, assertionChallenge.challenge);
      
              res.send(assertionChallenge);
          }
          // if not, send attributes to frontend to handle client-side
          else {
              res.send({ isAcceptet: safetyAttributes.isAccepted, isConfiremd: safetyAttributes.isConfirmed })
          }
      
      });
  </code></pre>