FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login
    1. Home
    2. fritzgaertner
    F
    • Profile
    • Following 0
    • Followers 0
    • Topics 4
    • Posts 5
    • Best 0
    • Controversial 0
    • Groups 0

    fritzgaertner

    @fritzgaertner

    0
    Reputation
    2
    Profile views
    5
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    fritzgaertner Unfollow Follow

    Latest posts made by fritzgaertner

    • FusionAuth without universal Login Page?

      Hey FusionAuth Community,

      since a few weeks I am using FusionAuth and I'm a really big fan. For my projects I'm using Express and NextJS (ReactJS).

      I would really like to know if it is possible to login with a normal submit form, instead of beeing directed to FusionAuth's Login Form (which I can only style with normal css and not tailwind). Anyone got an example (best case with functional password reset button) with React and Express?

      I tryed a few things like using the API, but nothing worked for me, maybe because of lacking experience.

      Would be grateful for every help!

      posted in General Discussion
      F
      fritzgaertner
    • RE: Express-React Example App on vServer

      Fixed the problem on my own, for everyone running into this problem too. Check your redirect uri in config.js and your fusionauth dashboard.

      In my case I got redirected to:

      http://login.ruffyg.de/oauth-callback?...........

      but of course it has to redirect to my express server which is on port 9000 so:

      http://login.ruffyg.de:9000/oauth-callback?...........

      posted in Q&A
      F
      fritzgaertner
    • Express-React Example App on vServer

      Hey FusionAuth Community,

      in the last few days I installed a docker image of fusionauth on my vserver, set everything up and made a new application.
      After that I used this tutorial:
      https://fusionauth.io/blog/2020/03/10/securely-implement-oauth-in-react
      to build a React-Express App. I made a few changes like serving the react app in a static way over the public folder, so it can run on my vServer without problems.

      Everything worked just fine and you can visit the app on http://login.ruffyg.de/

      But when I try to login with the right credentials my page redirects me to

      http://login.ruffyg.de/oauth-callback?code=8LS2k9VlXp43j-C7NGXKy9n_X3a9GA0jSIeKrBDUxeU&locale=de_DE&userState=Authenticated (<- I changed a few letters for security reasons)

      Normally it should redirect me to my react app, right? My oauth-callback.js looks like this...

      const express = require('express');
      const router = express.Router();
      const request = require('request');
      const config = require('../../config');
      
      router.get('/', (req, res) => {
        request(
          // POST request to /token endpoint
          {
            method: 'POST',
            uri: `http://login.ruffyg.de:${config.fusionAuthPort}/oauth2/token`,
            form: {
              'client_id': config.clientID,
              'client_secret': config.clientSecret,
              'code': req.query.code,
              'code_verifier': req.session.verifier,
              'grant_type': 'authorization_code',
              'redirect_uri': config.redirectURI
            }
          },
      
          // callback
          (error, response, body) => {
            // save token to session
            req.session.token = JSON.parse(body).access_token;
      
            // redirect to the React app
            res.redirect(`http://login.ruffyg.de:${config.clientPort}`);
          }
        );
      });
      
      module.exports = router;
      
      
      posted in Q&A
      F
      fritzgaertner
    • Mail with Password Reset has wrong URL

      Hello FusionAuth Community,

      I integrated FusionAuto to my vServer and setup an SMTP Mail Server.
      Everything works just fine, but when I send a password reset request, the mail looks like this:

      To change your password click on the following link.
      http://localhost:9011/password/change/9dyDHn5mBYAd3RAWaJNyYSKx2sNMUqEog2Pz1Ylnxdk?client_id=3c219e58-ed3e-4b18-ad48-f4f92793ae32&tenantId=903bf394-c2f5-f44d-888e-8e911fbb4096&code_challenge=UoQM8f0ULpoqgxwZ5CAeqyMoXv3ZwB0WcJZFBUcF8tw&code_challenge_method=S256&metaData.device.name=Windows Chrome&metaData.device.type=BROWSER&redirect_uri=%2Fadmin%2Flogin&response_type=code&scope=offline_access&state=aw1gFvAvZ6CP3FdEWr3yTnCBINlQ5eIDK57k9ZZcOlQ&timezone=Europe%2FBerlin

      • FusionAuth Admin

      But localhost is wrong my server runs on login.ruffyg.de and the fusionauth on login.ruffyg.de:9011

      How can I change this? I would be grateful for every answer!

      posted in General Discussion
      F
      fritzgaertner