Giter Club home page Giter Club logo

poker's Introduction

Hi there πŸ‘‹, I'm Michael Beutler!

Talking about Personal Stuffs:

  • πŸ›  Β  I’m currently working with Java Spring Boot, React and Kubernetes...
  • πŸš€ Β  I’m currently learning Full Stack Development.
  • πŸ‘¨πŸ»β€πŸ’» Β  Most of my private projects are available on GitHub.
  • πŸ‘Ύ Β  Fun fact: Equal is Not Always Equal in Javascript.

My Absolute Favorites:

  • πŸ’» Β  I love exploring new tech stack and building cool stuff.
  • πŸ“° Β  Reading & writing tech blogs whenever possible.
  • πŸ• Β  Hackathons, meetups & tech events.
  • β›΅ Β  Kubernetes & Helm!

Languages and Tools:

typescript javascript nodejs expressjs react kubernetes graphql sql mongodb git terminal angular java mysql php cpp python vue go

Projects and Dev Stuffs:

β˜„οΈ Github Streaks

Challenges and Hackathons

Show some ❀️ by starring some of the repositories!

poker's People

Contributors

dependabot[bot] avatar hdptrck avatar michaelbeutler avatar

Stargazers

 avatar

Watchers

 avatar

poker's Issues

Usernames not uniqe

socket.on(LOGIN, async (data) => {
        if (data && data.username && data.username.length > 0 && !data.username.isEmpty()) {
            const username = data.username.trim().trunc(10);
            if (DEBUG) { console.log(`login ${username}`.debug) }

            players.push(new Player(io, socket, username));
            socket.login = true;
            io.to(socket.id).emit(LOGIN_SUCCESS, { username });
        } else {
            if (DEBUG) { console.log(`invalid username`.debug) }
            io.to(socket.id).emit(LOGIN_ERROR, { text: "invalid username" });
        }
});

JWT Auth

using jwt middleware: JWT Middleware

var io = require('socket.io')();
var jwtAuth = require('socketio-jwt-auth');
 
// using middleware
io.use(jwtAuth.authenticate({
  secret: 'Your Secret',    // required, used to verify the token's signature
  algorithm: 'HS256'        // optional, default to be HS256
}, function(payload, done) {
  // done is a callback, you can use it as follows
  User.findOne({id: payload.sub}, function(err, user) {
    if (err) {
      // return error
      return done(err);
    }
    if (!user) {
      // return fail with an error message
      return done(null, false, 'user does not exist');
    }
    // return success with a user info
    return done(null, user);
  });
}));

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.