{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","results":{"codes":[]},"settings":"","params":[]},"next":{"description":"","pages":[]},"title":"Dummy mode","type":"basic","slug":"dummy-mode","excerpt":"Using login in dummy mode","body":"UserKit lets you use a core set of features with a dummy app-id and key:\n\n- Dummy app-id: `\"dummy\"`\n- Dummy secret-key: `\"dummy.dummy\"`\n\nThis can be useful for running integration or unit tests, or running a shared project in a development environment where sharing a secret key isn't an option.\n\nUse the dummy app-id and secret-key anywhere in your code that you would normally use a UserKit app id or secret key.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Getting a dummy user\"\n}\n[/block]\nCreating a dummy user isn't necessary. Logging in will result in a dummy user with a username matching whatever username you enter at login.\n\n**To login a dummy user**\n\nOnly username/password login is supported in dummy mode.\n\n- Enter any valid username in the username field.\n- Enter `\"password\"` in the password field. Any other password will result in login failure.\n\nThis will result in a dummy user with the following properties:\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"`username`\",\n    \"0-1\": \"Whatever username you entered during login\",\n    \"1-0\": \"`email`\",\n    \"1-1\": \"`<username>:::at:::example.com`\",\n    \"2-0\": \"`name`\",\n    \"2-1\": \"Username with upper-cased first letter. For example: \\\"user1\\\" would result in a name of \\\"User1\\\".\",\n    \"3-0\": \"`id`\",\n    \"3-1\": \"`\\\"dummy_usr__<username>\\\"`\"\n  },\n  \"cols\": 2,\n  \"rows\": 4\n}\n[/block]","updates":[],"order":0,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5db7048c2023520030a5cf29","project":"5589ceae9883a40d00c433f3","version":{"version":"1.0","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":true,"is_hidden":false,"is_deprecated":false,"categories":["5589ceaf9883a40d00c433f7","559ab19d2100d117005f1269","57d4a754899ab90e00105e5d","5807813b6d24211900953b99","5819154bf62fee0f00949855","5841d27cae05ac2500ba2680","5846c4ee5d064323007b1774","589e29c72793e937001c15c5","5cf0460e272f2c0014a80d17","5cf047bde14258005d7a374e","5db6fa2c7f86fa004ff2c35b","5e349a6a02520b006458b0ae","5e4c89eafd907100654072f2","5e4d7a1feca7f90018b15b9b","5e4eff0ec3399b005118d83a"],"_id":"5589ceae9883a40d00c433f6","releaseDate":"2015-06-23T21:25:02.865Z","__v":15,"createdAt":"2015-06-23T21:25:02.865Z","project":"5589ceae9883a40d00c433f3"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Testing","slug":"testing","order":7,"from_sync":false,"reference":false,"_id":"5db6fa2c7f86fa004ff2c35b","project":"5589ceae9883a40d00c433f3","version":"5589ceae9883a40d00c433f6","createdAt":"2019-10-28T14:24:44.695Z","__v":0},"user":"5542d87d795b590d001dc7ff","createdAt":"2019-10-28T15:09:00.505Z","__v":0,"parentDoc":null}

Dummy mode

Using login in dummy mode

UserKit lets you use a core set of features with a dummy app-id and key: - Dummy app-id: `"dummy"` - Dummy secret-key: `"dummy.dummy"` This can be useful for running integration or unit tests, or running a shared project in a development environment where sharing a secret key isn't an option. Use the dummy app-id and secret-key anywhere in your code that you would normally use a UserKit app id or secret key. [block:api-header] { "type": "basic", "title": "Getting a dummy user" } [/block] Creating a dummy user isn't necessary. Logging in will result in a dummy user with a username matching whatever username you enter at login. **To login a dummy user** Only username/password login is supported in dummy mode. - Enter any valid username in the username field. - Enter `"password"` in the password field. Any other password will result in login failure. This will result in a dummy user with the following properties: [block:parameters] { "data": { "0-0": "`username`", "0-1": "Whatever username you entered during login", "1-0": "`email`", "1-1": "`<username>@example.com`", "2-0": "`name`", "2-1": "Username with upper-cased first letter. For example: \"user1\" would result in a name of \"User1\".", "3-0": "`id`", "3-1": "`\"dummy_usr__<username>\"`" }, "cols": 2, "rows": 4 } [/block]