ShareShortcuts

Login System V2.1

This is a simple login system that you can add to any of your shortcuts!

williamf
Fork “Login System V2.1”

Built something new on top of this Shortcut? Share it as a fork: it becomes a Shortcut of your own, which you manage, and both pages link to each other so williamf gets credit.

  1. 1Get the Shortcut and change it in the Shortcuts app. Give it a name of its own.
  2. 2Share it from the Shortcuts app and copy the iCloud link.
  3. 3Come back here, paste the link and describe what is different, e.g. “Added a step that uses Apple Intelligence to personalise the text.”
Downloads
44K
Saved
1
Actions
40
Category
API
Version
2.1
Language
EN

This is a simple login system that you can add to any of your shortcuts! If you post a shortcut that contains my login system, please credit me. You need to download the data jar app before downloading this shortcut for this login system to work.

What's New

Version 2.1

+Minor bug fix. +Icon change.

Version History
2.1 Feb 5, 2022

+Minor bug fix. +Icon change.

2.0 Feb 5, 2022

+Enter signup system redone. I fixed the signup system so that you can create an account without opening the data jar app! (You still need the data jar app to be installed on your device for this to work) I also changed the help menu

1.1 Feb 5, 2022

This is V1 with minor updates. 1 menu renamed + added variables Variables were added so that this shortcut is easier to understand.

1.1 Feb 5, 2022

$

1.0 Feb 4, 2022

First release

What it does

40 actions
  1. Text
  2. Show Result
  3. Choose from Menu
    Login system
  4. Choose from Menu
    Signup
  5. Ask for Input
    Create username
  6. Set Variable
    Create username
  7. Check If Value Exists
    dk.simonbs.DataJar
  8. Set Variable
    Does this username already exist
  9. If
  10. Show Alert
    Error
  11. If
  12. Ask for Input
    Create password
  13. Set Variable
    Create password
  14. Generate Hash
  15. Set Value
    dk.simonbs.DataJar
  16. Show Alert
  17. Choose from Menu
    Login
  18. Ask for Input
    Enter username
  19. Set Variable
    Username
  20. Check If Value Exists
    dk.simonbs.DataJar
  21. If
  22. Get Value
    dk.simonbs.DataJar
  23. Set Variable
    Password input by data jar app
  24. Ask for Input
    Enter password
  25. Set Variable
    Password input by user
  26. Generate Hash
  27. If
  28. Show Alert
  29. If
  30. Show Alert
    Error
  31. If
  32. Show Alert
    Error
  33. Choose from Menu
    Help
  34. Choose from Menu
    What do you need help with?
  35. Choose from Menu
    Ading content to your account
  36. Show Alert
  37. Choose from Menu
    Contact info
  38. Show Alert
  39. Choose from Menu
    other
  40. Show Alert

View as code
Beta

Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.

#define color yellow
#define glyph key

show()

menu "Login system" {
item "Signup":
	prompt("Create username")
	@CreateUsername
	rawAction("dk.simonbs.DataJar.CheckIfValueExistsIntent", {
		"keyPath": "{@CreateUsername}"
	})
	@DoesThisUsernameAlreadyExist
	if @DoesThisUsernameAlreadyExist == 1 {
		alert("Username already exists", "Error")
	} else {
		prompt("Create password")
		@CreatePassword
		const Hash = hash(@CreatePassword)
		rawAction("dk.simonbs.DataJar.SetValueIntent", {
			"keyPath": "{@CreateUsername}",
			"valueConversionMode": "text",
			"values": "Hash"
		})
		confirm("Account created")
	}
item "Login":
	prompt("Enter username")
	@Username
	rawAction("dk.simonbs.DataJar.CheckIfValueExistsIntent", {
		"keyPath": "{@Username}"
	})
	if ValueExists == 1 {
		rawAction("dk.simonbs.DataJar.GetValueIntent", {
			"keyPath": "{@Username}"
		})
		@PasswordInputByDataJarApp
		prompt("Enter password", "Text")
		@PasswordInputByUser
		const Hash1 = hash(@PasswordInputByUser)
		if Hash1 == @PasswordInputByDataJarApp {
			confirm("Correct password")
		} else {
			alert("Username doesn't exist", "Error")
		}
	} else {
		alert("Incorrect password", "Error")
	}
item "Help":
	menu "What do you need help with?" {
	item "Ading content to your account":
		confirm("This is just a login system that you can put inside of some of your shortcuts. (I may add a way to add content to your account in the future) If you post a shortcut online that contains my login system, please credit me.")
	item "Contact info":
		confirm("Contact me at [email protected]")
	item "other":
		confirm("If you have any other things you need help with about this shortcut or if you have any complaints, or any new features, or bugs you would like to tell me about, contact me at [email protected]")
	}
}
Open in Cherri Playground Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.

Ratings & Reviews

Write a Review
–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings

No reviews yet. Be the first to share what you think!

Advertisement

More by williamf

See All

You Might Also Like

See All
Advertisement