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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:01:58+00:00 2026-05-25T21:01:58+00:00

i wont to implement authentication using google and facebook in my application any one

  • 0

i wont to implement authentication using google and facebook in my application
any one share example that work for authentication in java webapp
without any java framework

i try with socialaut
its using struts and spring framework but i not use that framework in my application so give any example that work in simple tomcat application without any framework

  • 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-25T21:01:58+00:00Added an answer on May 25, 2026 at 9:01 pm

    add this code on login page request

     SocialAuthConfig config = SocialAuthConfig.getDefault();
      config.load(); // load your keys information 
      SocialAuthManager manager = new SocialAuthManager();
      manager.setSocialAuthConfig(config);
    
      String successUrl = "http://localhost:8080/yourapp/status
      String url = manager.getAuthenticationUrl("facebook", successUrl);
      session.setAttribute("authManager", manager);
    

    redirect yout page to url for authentication

    add this code on /status url

    SocialAuthManager manager = (SocialAuthManager)session.getAttribute("authManager");
    
       AuthProvider provider = manager.connect(paramsMap);
    
      // get profile
      Profile p = provider.getUserProfile();
    
      // you can obtain profile information
      System.out.println(p.getFirstName());
    
      // OR also obtain list of contacts
      List<Contact> contactsList = provider.getContactList();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to implement application settings to have them update settings that wont be
strtok wont work correctly when using char *str as the first parameter (not the
I can't figure out why the following wont work, any ideas?? public interface IFieldSimpleItem
I'm building a Google App Engine web app, with a Java back end, that
I want to use one of the centralized authentication systems such as OpenId, Google
I'm creating a web app that requires registration/authentication, and I'm considering using an email
I wont to do insert to one mysqll server to and get the data
Any idea why this wont print the errors? // Validate the email if (preg_match($regex,
not sure why my code wont work, im teaching myself javascript i know php
I'd like to call a query with a field name filter that I wont

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.