Editorial Workflows

IndieAuth

public workflow

Install Workflow...

This workflow contains at least one Python script. Only use it if you trust the person who shared this with you, and if you know exactly what it does.

I understand, install the workflow!

This is a workflow for Editorial, a Markdown and plain text editor for iOS. To download it, you need to view this page on a device that has the app installed.

Description: Authorizes access to eg. a Micropub endpoint using the IndieWeb IndieAuth protocol.

Strongly inspired by the "RV: GitHub Authorize" workflow.

Shared by: VoxPelli

Comments: Comment Feed (RSS)

There are no comments yet.

+ Add Comment

Workflow Preview
Run Python Script ?
Source Code
#coding: utf-8
import workflow, keychain, console

token = workflow.get_input()

if token is None or token == '':
	token = keychain.get_password('VoxPelli: IndieAuth Token', 'Personal IndieAuth Token')

	if token is None:
		token = ""
else:
	workflow.set_variable('new_indie_token', token)

workflow.set_variable('indie_token', token)
If… ?
Run the block if
indie_token
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Request Text Input ?
Title
Enter your IndieAuth token
Initial Text
  • Single Line
  • Multiple Lines
Keyboard Options:
Set Variable ?
Variable Name
new_indie_token
Value
Input
Set Variable ?
Variable Name
indie_token
Value
new_indie_token
…End If
If… ?
Run the block if
indie_token
  • is Equal to
  • is Not Equal to
  • Contains
  • Doesn't Contain
  • Matches Regular Expression
Stop ?
Stop
  • This Workflow
  • Repeat Block
Show HUD Alert
OFF
Message
Stopped
…End If
Run Python Script ?
Source Code
#coding: utf-8
import workflow, console, keychain

new_token = workflow.get_variable('new_indie_token')
token = workflow.get_variable('indie_token');

if new_token is not None:
	keychain.set_password('VoxPelli: IndieAuth Token', 'Personal IndieAuth Token', new_token)
	token = new_token
	console.hud_alert('IndieAuth token saved', 'success', 1.0)

workflow.set_output(token)