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 7584035
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:49:31+00:00 2026-05-30T18:49:31+00:00

I use dotnetOpenAuth. I want to request authorization to the user’s gamil. Do I

  • 0

I use dotnetOpenAuth. I want to request authorization to the user’s gamil.

Do I need to use openId first?

Cannot find a decent tutorail. Can anyone help?

Tried this code unsuccesfully. Anyway I don’t seems to ask for Gmail scope at the auth request, so I’m confused

public void PrepareAuthorizationRequest(Uri authCallbakUrl)
{
    var consumer = new WebConsumer(GoogleConsumerConsts.ServiceDescription, mConsumerTokenManager);

    // request access
    consumer.Channel.Send(consumer.PrepareRequestUserAuthorization(authCallbakUrl, null, null));

    throw new NoRedirectToAuthPageException();
}

public ProcessAuthorizationRequestResponse ProcessAuthorizationRequest()
{
    ProcessAuthorizationRequestResponse response;
    // Process result from the service provider
    var consumer = new WebConsumer(GoogleConsumerConsts.ServiceDescription, mConsumerTokenManager);
    var accessTokenResponse = consumer.ProcessUserAuthorization();

    // If we didn't have an access token response, this wasn't called by the service provider
    if (accessTokenResponse == null)
        response = new ProcessAuthorizationRequestResponse
                       {
                           IsAuthorized = false
                       };
    else
    {
        // Extract the access token
       string accessToken = accessTokenResponse.AccessToken;
       response = new ProcessAuthorizationRequestResponse
        {
            IsAuthorized = true,
            Token = accessToken,
            Secret = mConsumerTokenManager.GetTokenSecret(accessToken)
        };
    }
    return response;
}

private string Test2()
{
    // Process result from linked in
    var google = new WebConsumer(GoogleConsumerConsts.ServiceDescription, mConsumerTokenManager);
  //  var accessToken = GetAccessTokenForUser();
    var accessToken = String.Empty;

    // Retrieve the user's profile information
    var endpoint = GoogleConsumerConsts.GetGmailFeedsEndpoint;// new MessageReceivingEndpoint("http://api.linkedin.com/v1/people/~", HttpDeliveryMethods.GetRequest);
    var request = google.PrepareAuthorizedRequest(endpoint, accessToken);
    var response = request.GetResponse();
    return (new StreamReader(response.GetResponseStream())).ReadToEnd();
}
  • 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-30T18:49:33+00:00Added an answer on May 30, 2026 at 6:49 pm

    No, you don’t need to use OpenID if you just want to access the user’s Gmail. OpenID is for when you want to authenticate the user. OAuth is for when you want to access the user’s data.

    You need to include the scope parameter in your authorization request as described in this question: Adding scopes to OAuth 1.0 authorization request with DotNetOpenAuth.

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

Sidebar

Related Questions

I want to use DotNetOpenAuth in my website for authentication + authorization (gmail). However,
I want to use DotNetOpenAuth library for implementing OpenId Login in my web application.
I am currently playing with DotNetOpenAuth to make an ASP.NET (C#) website use OpenID
I'm building an ASP.NET MVC site where I want to use DotNetOpenAuth to implement
If I want to integrate DotNetOpenAuth (primary for people to use their Google/Yahoo accounts
I want to use DotNetOpenAuth to create something like this Is is authentication or
I use DotNetOpenAuth in my Asp.Net application. I want to create a login page
I'm beginning to use DotNetOpenAuth and want to understand what the following members of
I know stackoverflow uses OpenID authentication. I want to try and use this as
I use DotnetOpenAuth, i need to pass some data with SetCallbackArgument, but the problem

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.