Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7020893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:22:42+00:00 2026-05-27T23:22:42+00:00

I don’t understand what everyauth promises are. I see that I need to return

  • 0

I don’t understand what everyauth promises are.

I see that I need to return a promise object or user, but what is an everyauth promise?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T23:22:42+00:00Added an answer on May 27, 2026 at 11:22 pm

    It’s useful when you have a function that performs authentication, but which does so asynchronously. You can’t directly return user information from the function (because you have to wait for the callback to fire), so instead you return a promise. This is a special object that acts as a “placeholder” for what will eventually be filled with user information when the asynchronous request does complete.

    Example from the documentation:

    function (session, accessToken, extra, oauthUser) {
      var promise = this.Promise();
      asyncFindUser( function (err, user) {
        if (err) return promise.fail(err);
        promise.fulfill(user);
      });
      return promise;
    }
    

    It means that the calling context can carry on doing work right up until it really needs that user information (and all the while, in the meantime, the asynchronous request is completing); it would have to wait at that later stage if the user information wasn’t yet available. You might think of it as a very specific case of thread creation and joining.

    “Promise” is a generic term that covers this sort of functionality in all kinds of languages and contexts:

    In computer science, future, promise, and delay refer to constructs used for synchronization in some concurrent programming languages. They describe an object that acts as a proxy for a result that is initially not known, usually because the computation of its value has not yet completed.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Don't ask me why but I need to do the following: string ClassName =
(Don't know if this is strictly on-topic, but I don't see any better Stack
Don't think that I'm mad, I understand how php works! That being said. I
don't understand: in my controller: @json = User.all.to_gmaps4rails do |user| \Title\: \#{user.email}\ end in
Don't ask me why but i can't use this method because I need to
DON'T ASK WHY but... I have a regex that needs to be case insensitive
Don't need to do this right now but thinking about the future... What would
don't know better title for this, but here's my code. I have class user
don't know if the title describes anything about what I'm trying to say but
Don't ask me how but I'm in a situation where I have DCPs published

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.