search

Home  >  Q&A  >  body text

Have any of you guys done a project that separates the front-end and back-end of php+vue.js? I would like to ask, the front-end sends a verification code to register and log in.

The front-end sends SMS verification code to log in and register. How to maintain the session? And should the SMS verification code be stored in the database or in the session? Or is there any other better solution?

小萝卜头小萝卜头1634 days ago1263

reply all(5)I'll reply

  • 对方正在输入....

    对方正在输入....2020-05-26 16:17:47

    Save redis

    reply
    0
  • 唯you爱

    唯you爱2020-05-26 14:21:17

    If you don’t understand, you can ***Q: 895163012

    reply
    0
  • 唯you爱

    唯you爱2020-05-26 14:20:49

    This does not exist across domains, just use the SMS api interface callback, log in, usually session

    reply
    0
  • 小萝卜头

    The session will become invalid, and the session data cannot be retrieved by calling the interface in vue.js. Because the sessionid here is always changing and relies on cookies, it cannot be obtained! I switched to redis to send text messages. The problem has been solved. Thank you.

    小萝卜头 · 2020-05-26 15:51:41
  • 小萝卜头

    小萝卜头2020-05-25 11:23:03

    Because it involves cross-domain, the session will be invalid? What's the solution?

    reply
    0
  • Cancelreply