back

by newusertoday·4y ago·view on hn ↗
if you use gmail you can write appscript to extract the otp(regex part), service that sent the otp and timestamp when you recieved the mail to your "server" via post request.(i am assuming you know how to make a post request with dummy data using curl or javascript)

you can use django/ruby on rails or golang for your server, authentication is available out of the box for django and there is great documentation for api.

I am not clear on what you intend to do with captcha so no comments.

1 comments
i plan to use a mail server independent of google so i can manage more parts of it without being subject to limitations of the email providers and because i am not going to "send" any email, there isnt even a problem of deliverability.

my question is that does there an appscript alternative that i can self host on my server..

so you are saying

email server> appscript(alternative)>django><browser ?

the OTP is for lazy people who cant be bothered to check their multiple emails for OTPs. nothing sinister...

there are three parts to your problem 1. recieving mail and processing it. Since you are planning to host it by yourself answer would depend on what are you using for hosting. Solution can be as simple as reading a file(i.e. recieved mail) and extracting relevant fields using whatever language you know python/shell ecript etc. This part would be highly specific to what you use as your mail server.

2. server that responds to the api request made by chrome extension. This is where you can use django it would provide basic security as well as cater to the api request made by your extension here any server would do as your use case is quite simplistic. It should be few lines of code depending on your familiarity of language.

3. Chrome extension this would be in javascript.

are you developer? or do you have access to developers? if yes than it should be straightforward.