Skip to content

Commit

Permalink
fix: login via telegram when not on webapp (#22)
Browse files Browse the repository at this point in the history
* fix: login via telegram when not on webapp

* fix: login via telegram when not on web app
  • Loading branch information
TaToTanWeb authored Nov 2, 2023
1 parent a784d3a commit e944751
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
10 changes: 2 additions & 8 deletions static/scripts/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,5 @@ function sendConfirm(options, onConfirm) {
// Other constants
const constants = {
defaultCover: "static/images/no-cover.png",
botUsername: "BookMarketTestBot"
};


// Things to do before submitting:
// - changing telegram widget bot username
// - changing username here
// - /setdomain instructions
botUsername: "UNICT_Book_Market_Bot"
}
4 changes: 2 additions & 2 deletions templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<button-text>I tuoi annunci</button-text>
</base-component>
<script type = "text/javascript" src = "static/scripts/telegram.js"></script>
<script async src="https://telegram.org/js/telegram-widget.js?22" data-telegram-login="BookMarketTestBot" data-size="large" data-onauth="onTelegramAuth(user)" data-request-access="write"></script>
<script async src="https://telegram.org/js/telegram-widget.js?22" data-telegram-login="UNICT_Book_Market_Bot" data-size="large" data-onauth="onTelegramAuth(user)" data-request-access="write"></script>
</header-button>
</custom-header>
<search-bar name = "search">
Expand Down Expand Up @@ -288,4 +288,4 @@
</custom-footer>
</app-container>
</body>
</html>
</html>

0 comments on commit e944751

Please sign in to comment.