Open ce2cs opened 2 years ago
you may have a look at func (mw *GinJWTMiddleware) TokenGenerator(data interface{}) (string, time.Time, error)
I guess that you have joined the training camp organized by ByteDance also. The framework gin has designed a chain call API, which means you can call the LoginHandler of this project after calling register function that has already registered the user somewhere.
New to web development. I was wondering how to get token if I need respond token in register API. I do not use the middleware in register router we cannot get a token before we register an account.