<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.appstudio.dev/index.php?action=history&amp;feed=atom&amp;title=Log_in</id>
	<title>Log in - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.appstudio.dev/index.php?action=history&amp;feed=atom&amp;title=Log_in"/>
	<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=Log_in&amp;action=history"/>
	<updated>2026-08-29T21:30:54Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=Log_in&amp;diff=11209&amp;oldid=prev</id>
		<title>Ghenne at 15:23, 25 February 2021</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=Log_in&amp;diff=11209&amp;oldid=prev"/>
		<updated>2021-02-25T15:23:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 15:23, 25 February 2021&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After you&#039;ve [[First_app|initialized]], you can use &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Volt &lt;/del&gt;to control who is allowed to use your app. Only users who have registered will be able to log into your app.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;After you&#039;ve [[First_app|initialized]], you can use &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;VoltServer &lt;/ins&gt;to control who is allowed to use your app. Only users who have registered will be able to log into your app.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Checking if user is logged in ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Checking if user is logged in ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Logging In ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Logging In ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Logging in identifies your user to the &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Volt &lt;/del&gt;server. Here is a typical log in screen:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Logging in identifies your user to the &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;VoltServer &lt;/ins&gt;server. Here is a typical log in screen:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Logging-in-and-out.png]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Logging-in-and-out.png]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l35&quot;&gt;Line 35:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 35:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;email&amp;#039;&amp;#039; - string, required. The email address of the user.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;email&amp;#039;&amp;#039; - string, required. The email address of the user.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;password&amp;#039;&amp;#039; - string, required. The user&amp;#039;s password.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;password&amp;#039;&amp;#039; - string, required. The user&amp;#039;s password.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;appId&#039;&#039; - string, optional. The &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Volt &lt;/del&gt;ID of the app to sign into. If not supplied, defaults to value set in &amp;lt;code&amp;gt;$volt.init(appId)&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &#039;&#039;appId&#039;&#039; - string, optional. The &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;VoltServer &lt;/ins&gt;ID of the app to sign into. If not supplied, defaults to value set in &amp;lt;code&amp;gt;$volt.init(appId)&amp;lt;/code&amp;gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;callback&amp;#039;&amp;#039; - function(error, data), required. The function in your app to call when the login is complete (or fails).&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &amp;#039;&amp;#039;callback&amp;#039;&amp;#039; - function(error, data), required. The function in your app to call when the login is complete (or fails).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key nsbasic_mediawiki1348787612:diff:1.41:old-9277:rev-11209:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Ghenne</name></author>
	</entry>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=Log_in&amp;diff=9277&amp;oldid=prev</id>
		<title>Ghenne: /* Logging In */</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=Log_in&amp;diff=9277&amp;oldid=prev"/>
		<updated>2017-06-19T21:29:24Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Logging In&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:29, 19 June 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l69&quot;&gt;Line 69:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 69:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   End Sub&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   End Sub&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;   &amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Once the user is logged in, he stays logged in. The info is save to localStorage so the next time the app is run, the user does not have to log in again.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Logging Out ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Logging Out ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key nsbasic_mediawiki1348787612:diff:1.41:old-9238:rev-9277:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Ghenne</name></author>
	</entry>
	<entry>
		<id>https://wiki.appstudio.dev/index.php?title=Log_in&amp;diff=9238&amp;oldid=prev</id>
		<title>Sarah: Instructions for logging in and out</title>
		<link rel="alternate" type="text/html" href="https://wiki.appstudio.dev/index.php?title=Log_in&amp;diff=9238&amp;oldid=prev"/>
		<updated>2017-05-26T22:04:43Z</updated>

		<summary type="html">&lt;p&gt;Instructions for logging in and out&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;After you&amp;#039;ve [[First_app|initialized]], you can use Volt to control who is allowed to use your app. Only users who have registered will be able to log into your app.&lt;br /&gt;
&lt;br /&gt;
== Checking if user is logged in ==&lt;br /&gt;
&lt;br /&gt;
Use the &amp;lt;code&amp;gt;$volt.auth.isLoggedIn()&amp;lt;/code&amp;gt; to check if a user is logged in:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  if ($volt.auth.isLoggedIn()) {&lt;br /&gt;
    // Ok to do processing&lt;br /&gt;
  } else {&lt;br /&gt;
    // ask user to log in&lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;basic&amp;quot;&amp;gt;&lt;br /&gt;
  If $volt.auth.isLoggedIn() Then&lt;br /&gt;
    &amp;#039;Ok to do processing&lt;br /&gt;
  Else&lt;br /&gt;
    &amp;#039;ask user to log in&lt;br /&gt;
  End If&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Logging In ==&lt;br /&gt;
&lt;br /&gt;
Logging in identifies your user to the Volt server. Here is a typical log in screen:&lt;br /&gt;
&lt;br /&gt;
[[File:Logging-in-and-out.png]]&lt;br /&gt;
&lt;br /&gt;
Once you have have obtained the user&amp;#039;s email and password (either from a screen like the above or otherwise), you can call the &amp;lt;code&amp;gt;$volt.auth.login()&amp;lt;/code&amp;gt; function to log the user in.&lt;br /&gt;
&lt;br /&gt;
The syntax of the function is:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;$volt.auth.login&amp;#039;&amp;#039;&amp;#039;(&amp;#039;&amp;#039;email&amp;#039;&amp;#039;, &amp;#039;&amp;#039;password&amp;#039;&amp;#039;, &amp;#039;&amp;#039;appId&amp;#039;&amp;#039;, &amp;#039;&amp;#039;callback&amp;#039;&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;email&amp;#039;&amp;#039; - string, required. The email address of the user.&lt;br /&gt;
* &amp;#039;&amp;#039;password&amp;#039;&amp;#039; - string, required. The user&amp;#039;s password.&lt;br /&gt;
* &amp;#039;&amp;#039;appId&amp;#039;&amp;#039; - string, optional. The Volt ID of the app to sign into. If not supplied, defaults to value set in &amp;lt;code&amp;gt;$volt.init(appId)&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;#039;&amp;#039;callback&amp;#039;&amp;#039; - function(error, data), required. The function in your app to call when the login is complete (or fails).&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  butSignOn.onclick = function () {&lt;br /&gt;
    $volt.auth.login(inpEmail.value, inpPassword.value, signOnCallback);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  function signOnCallback(error, data) {&lt;br /&gt;
    if (error) {&lt;br /&gt;
      if (!data) {&lt;br /&gt;
        data = { message: &amp;#039;Network Error&amp;#039; };&lt;br /&gt;
      }&lt;br /&gt;
      alert(data.message);&lt;br /&gt;
    } else {&lt;br /&gt;
      alert(&amp;#039;User successfully logged in&amp;#039;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;basic&amp;quot;&amp;gt;&lt;br /&gt;
  Sub butSignOn.onclick()&lt;br /&gt;
    $volt.auth.login(inpEmail.value, inpPassword.value, signOnCallback);&lt;br /&gt;
  End Sub&lt;br /&gt;
&lt;br /&gt;
  Function signOnCallback(error, data)&lt;br /&gt;
    If error Then&lt;br /&gt;
      If (!data) Then data = { message: &amp;quot;Network Error&amp;quot; }&lt;br /&gt;
      MsgBox data.message&lt;br /&gt;
    Else&lt;br /&gt;
      MsgBox &amp;quot;User successfully logged in&amp;quot;&lt;br /&gt;
    End If&lt;br /&gt;
  End Sub&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Logging Out ==&lt;br /&gt;
&lt;br /&gt;
You can log your user out by using &amp;lt;code&amp;gt;$volt.auth.logout()&amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  $volt.auth.logout();&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;basic&amp;quot;&amp;gt;&lt;br /&gt;
  $volt.auth.logout()&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== AppStudio Users ==&lt;br /&gt;
&lt;br /&gt;
[https://www.nsbasic.com/ AppStudio] includes a form for handling login duties, called frmSignOn. If you include it in your app, you can call it as follows:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;
  butSignIn.onclick = function() {&lt;br /&gt;
    showSignIn(signInCallback);&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
  function signInCallback() {&lt;br /&gt;
    butSignIn.disabled = true;&lt;br /&gt;
    NSB.MsgBox(&amp;#039;SignIn successful.&amp;#039;);&lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;syntaxhighlight lang=&amp;quot;basic&amp;quot;&amp;gt;&lt;br /&gt;
  Function butSignIn_onclick()&lt;br /&gt;
    showSignIn(signInCallback)&lt;br /&gt;
  End Function&lt;br /&gt;
&lt;br /&gt;
  Function signInCallback()&lt;br /&gt;
    butSignIn.disabled = True&lt;br /&gt;
    MsgBox &amp;quot;SignIn successful.&amp;quot;&lt;br /&gt;
  End Function&lt;br /&gt;
  &amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Reference ==&lt;br /&gt;
&lt;br /&gt;
* JavaScript API&lt;br /&gt;
** [[https://docs.voltcloud.io/client/$volt.auth.html#.isLoggedIn https://docs.voltcloud.io/client/$volt.auth.html#.isLoggedIn]]&lt;br /&gt;
** [[https://docs.voltcloud.io/client/$volt.auth.html#.login https://docs.voltcloud.io/client/$volt.auth.html#.login]]&lt;br /&gt;
** [[https://docs.voltcloud.io/client/$volt.auth.html#.logout https://docs.voltcloud.io/client/$volt.auth.html#.logout]]&lt;br /&gt;
* REST API: [[https://docs.voltcloud.io/api/#authentication-login-post https://docs.voltcloud.io/api/#authentication-login-post]]&lt;/div&gt;</summary>
		<author><name>Sarah</name></author>
	</entry>
</feed>