A method for verifying a virtual code for authentication, which is performed by a server, comprising:
- receiving at least one of a virtual code for primary authentication and a virtual code for secondary authentication from a device for generating a virtual code for authentication;
- and
- performing verification on at least one of the virtual code for primary authentication and the virtual code for secondary authentication,
- wherein if the virtual code for secondary authentication comprises a plurality of codes, performing the verification comprises:
- extracting first user identification (UID) which is identification information of a card based on a first code and second code of the plurality of codes and performing verification on the card, and
- extracting second UID which is identification information of the device for generating a virtual code for authentication based on the first code and third code of the plurality of codes and performing verification on the device for generating a virtual code for authentication.